From: Bill Kelly Date: 2005-09-05T07:07:30+09:00 Subject: Re: Nonblocking and/or win32 (was: Re: [ANN] EventLoop 0.0.20050825.1600) From: "Bill Kelly" > >> require 'socket' > => true > >> require 'thread' > => true > >> cl = TCPSocket.new("localhost", 12345) > => # > >> th1 = Thread.new { sleep(1.0) until cl.eof? } > => # > >> th2 = Thread.new { sleep(1.0) until cl.eof? } > => # > >> cl.eof? > > ^^^^^^^^ hang I guess it must be something very basic I'm not aware of about #eof? ... Because even: > >> require 'socket' > => true > >> require 'thread' > => true > >> cl = TCPSocket.new("localhost", 12345) > => # > >> cl.eof? hangs. Is it not possible to check for EOF without blocking? Regards, Bill