lib/never_block/db/fibered_postgres_connection.rb
# The callback, this is called whenever
# there is data available at the socket
The callback, this is called whenever
there is data available at the socket
The callback this is called whenever there is data available at the socket
def process_command
        self.consume_input
        unless is_busy		
          res, data = 0, []
          while res != nil
            res = self.get_result
            data << res unless res.nil?
          end
          @fiber.resume(data.last)
        end
      end
def process_command self . consume_input unless is_busy res , data = 0 , [ ] while res != nil res = self . get_result data << res unless res . nil? end @fiber . resume ( data . last ) end end
The callback, this is called whenever
there is data available at the socket
The callback this is called whenever there is data available at the socket
# make sure all commands are sent # before attempting to read #return unless self.flush #let the fiber continue its work		      