From: snacktime Date: 2005-10-12T01:33:20+09:00 Subject: Re: event based model - best way to implement? ------=_Part_16171_24340037.1129048397466 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > > > You architecture is not fully clear to me, but given the small about of > sources and sinks I'd use a thread per source and either do the processin= g > directly in that thread or push tasks down a queue. IMHO this is far > easier in this case than writing a select loop that does the multiplexing= . > Does that sound reasonable to you? It was late and my brain was tired.. My question really involved around the best way to constantly read from a socket in ruby and at the same time be able to detect when a client connects with data that needs to be written to the socket. After looking around some more it looks like in the thread that holds the connection to asterisk a simple loop combined with io/wait would work. Any reason to use io/wait over select in a case like this? ------=_Part_16171_24340037.1129048397466--