From: Francis Cianfrocca Date: 2007-09-03T23:29:50+09:00 Subject: Re: Blocking UDP recv() interaction with select() ------=_Part_4824_17288301.1188829789194 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/2/07, Mark Zvilius wrote: > > I want to use Ruby for a UDP server application under Windows XP. I > intend to use two threads: one for a simple UI, and a separate thread > for the UDP server (with blocking calls). > > As a proof of concept I wrote the following test code, whose intent is > to wait for an incoming message, with the user able to press CTRL-C to > terminate the "server." Look at Ruby/EventMachine, which can solve your problem without threads. Sync to the current head revision to get a recent addition which allows you to respond to keyboard input. ------=_Part_4824_17288301.1188829789194--