From: Piergiuliano Bossi Date: 2005-01-25T19:00:52+09:00 Subject: Re: TCPSocket.new blocks other threads Hello Cristoph, I can pragmatically confirm what Eero was saying. The following script works fine on Win2K SP4. C:\tmp>type sock.rb require "socket" Thread.abort_on_exception= true Thread.new { sleep 1 begin TCPSocket.new("192.168.111.222", 1234) rescue end puts "done" } loop { puts "." sleep 0.25 } C:\tmp>ruby -v sock.rb ruby 1.8.2 (2004-11-06) [i386-mswin32] .. .. .. .. done .. .. .. .. .. .. .. .. .. .. .. .. .. sock.rb:15:in `sleep': Interrupt from sock.rb:15 from sock.rb:13:in `loop' from sock.rb:13 No hangs at all, it runs smoothly if I am disconnected from the network, but if I connect my address is in the form 192.168.xxx.yyy ==> re-executing the same script it hangs before writing "done" and then it writes "done" when timeout occurs (20 seconds in my case). Ciao, Giuliano christoph.heindl@gmail.com wrote: > thanks for your reply Ville. > > I'm just curious, but have you tried to use an ip address instead of > "xxx.nonexisting.xxx". E.g 192.168.0.5 (if 192.168.0.5 is not > reachable). > I have only windows xp systems around, maybe it turns out to be a > windows xp problem? > -- If you want to send me an email address should be 'p', then a dot, followed by 'bossi' at 'quinary', another dot and 'com' at last