Method: Quartz::GoProcess#read
- Defined in:
- lib/quartz/go_process.rb
#read ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/quartz/go_process.rb', line 113 def read value = '' loop do begin value << socket.recv_nonblock(MAX_MESSAGE_SIZE) break if value.end_with?("\n") rescue READ_EXCEPTION IO.select([socket], [], []) end end MultiJson.load(value) end |