pah.. now it just dont do nothing..

2005/12/16, Arto Pastinen <arto.pastinen / gmail.com>:
> 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 <arto.pastinen / gmail.com>:
> > 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
> >
> >
>
>