msgpack-ruby icon indicating copy to clipboard operation
msgpack-ruby copied to clipboard

[JRuby] Thread blocked on `MessagePack::Unpacker.new(socket)`

Open abbshr opened this issue 7 years ago • 1 comments

# jruby 9.1.13.0 (2.3.3)
sock = TCPSocket.new "localhost", 3000
u = MessagePack::Unpacker.new sock # => blocked here
# - unreachable, until remote endpoint close the connection -
u.each { |pack| p pack }

but if MessagePack::Unpacker.new(file_stream) is called on a file I/O stream, everything is ok

abbshr avatar Sep 22 '17 05:09 abbshr

Yeah isn't it blocked because it's trying to read from the socket? If you put some data into the socket from the other end does it work?

chrisseaton avatar Jul 20 '22 12:07 chrisseaton