From: Tony Arcieri Date: 2010-01-03T08:49:06+09:00 Subject: Re: "Dummy" IO object to push and pull data? --000e0cd70e6e21529f047c37228d Content-Type: text/plain; charset=ISO-8859-1 On Fri, Jan 1, 2010 at 5:40 PM, Shay Hawkins wrote: > Hello, > > I'm relatively new to advanced Ruby programming, and I seem to be in > need of a "dummy" IO object that does nothing except allowing reading > and writing to it. (I suppose it could do more, but I'd like to keep it > as simple as possible.) What I mean is, I need to use a select statement > to check an array two IO objects that could have data to be read. > However, in other threads running, I will be needing to push data to > these objects. > If this is all just for thread synchronization, you shouldn't be using IO primitives at all; you should be using thread synchronization primitives. Try ri ConditionVariable and see if that accomplishes what you're trying to do. -- Tony Arcieri Medioh! A Kudelski Brand --000e0cd70e6e21529f047c37228d--