From: Arto Pastinen Date: 2005-12-16T19:09:15+09:00 Subject: Re: nonblocking TCPSocket in multithread software. It seems work if i lock thread.. funny.. :) a = Thread.new do s = TCPSocket.new('localhost', 4343) s.nonblock = true Thread.critical { p s.read # it block's here no matter what i do } end a.join - Artsi 2005/12/16, Arto Pastinen : > Hi! > > Why this blocks? > > a = Thread.new do > s = TCPSocket.new('localhost', 4343) > s.nonblock = true > p s.read # it block's here no matter what i do > end > a.join > > .. and how to make it nonblock? > > It works fine if i drive it in main thread. > > Thnx: Artsi > >