From: "Lars M." Date: 2003-01-22T02:35:06+09:00 Subject: Re: [Threads + Sockets] Strange behavior Excellent! Thanks so much! I would have never guessed that it is too fast to allow another thread to get started. Thanks again, -Lars ----- Original Message ----- From: "Peter Hickman" To: "ruby-talk ML" Sent: Tuesday, January 21, 2003 5:58 PM Subject: Re: [Threads + Sockets] Strange behavior > I modified your code to include a rescue clause and of course got a > whole load of... > > start > failed > done > > Then I set the socket to a valid address and got a whole load of > > start > done > > So it would seem that your code works but perhaps too fast between the > socket open and close for the other thread to get started. So I added a > sleep 5 between the open and close. > > start > start > start > start > start > start > start > start > start > start > done > done > done > done > done > done > done > done > done > done > > So the problem with your code is that the operation of opening the > socket and closing it is too fast to allow another thread to get started > giving the appearance of serial execution. > > You are learning fast! > >