From: nobu.nokada@... Date: 2002-08-14T08:39:49+09:00 Subject: Re: "gets" blocking process not thread (in Windows only) Hi, At Tue, 6 Aug 2002 23:33:29 +0900, Paul Brannan wrote: > > I heard it's not guaranteed to work with sockets, and > > WSAEventSelect() is needed to handle sockets but it set the > > socket to non-blocking mode. Currently, non-blocking IO causes > > Errno::EWOULDBLOCK exception. We're still discussing about > > NBIO ([ruby-talk:46296]). > > I wonder what "not guaranteed" means. It means, it depends on the implementation and MAY work. It just seems to work with Microsoft's protocol stack on Windows NT 4.0, but may not with future version. > ACE (http://www.cs.wustl.edu/~schmidt/ACE.html), which is designed for > working with sockets and doing network programming, uses > WaitForMultipleObjects in its WFMO reactor. If ACE can do it, then I'm > sure Ruby can as well, but not being a Windows programmer, I don't know > what kinds of issues there might be. Thank you for the info. At first glance, ACE also seems to bind event handle to socket handle with WSAEventSelect() to use in WaitForMultipleObjects(). -- Nobu Nakada