lib/polyphony/extensions/io.rb in polyphony-0.42 vs lib/polyphony/extensions/io.rb in polyphony-0.43

- old
+ new

@@ -199,9 +199,13 @@ alias_method :orig_read_nonblock, :read_nonblock def read_nonblock(maxlen, buf = nil, _options = nil) buf ? readpartial(maxlen, buf) : readpartial(maxlen) end + def read_loop(&block) + Thread.current.agent.read_loop(self, &block) + end + # alias_method :orig_read, :read # def read(length = nil, outbuf = nil) # if length # return outbuf ? readpartial(length) : readpartial(length, outbuf) # end