From: nobu.nokada@... Date: 2002-08-06T03:28:17+09:00 Subject: Re: "gets" blocking process not thread (in Windows only) Hi, At Mon, 5 Aug 2002 20:23:12 +0900, Matt Pattison wrote: > > > The problem with my program is that (in Windows) gets seems to block the entire > > > process rather than just the current thread. This program works as expected in > > > linux, with the poll and process threads running continuously whilst the input > > > thread is waiting for user input. In windows however all threads appear to halt > > > as soon as the gets line is reached in the input thread, and only continue once > > > user input has been given. Can anyone help? > > > > This limitation comes from that the current implementation uses > > select() in winsock. It works only for socket handles, so the > > others are treated as always immediately readable/writable. > > This problem has been known but still unsolved. > > Is this a problem in the cygwin as well as the vc++ compiled versions of ruby? > I was hoping for a workaround for my problem, so I can get my program working > (it needs to run in Windows). Under cygwin, apparently once you type any key and "gets" block the process. > My other option was to try 1.7.2, but it seems from this email that that won't > solve my problems. No, unfortunately, not yet. In near future, non-blocking IO might help you, but I don't know hot to set non-socket IO to non-blocking mode under Windows. -- Nobu Nakada