[concurrency-interest] Basic question on making a thread waiting for 2 mailboxes...

Gregg Wonderly gregg at cytetech.com
Wed Apr 25 19:29:21 EDT 2007



Szabolcs Ferenczi wrote:
> On 23/04/07, Gregg Wonderly <gregg at cytetech.com> wrote:
>>What I would do, is use threads that read from the two queues and put the
>>objects into a single queue that you can take from.
> 
> Do you mean something like this, or something simpler? At least this
> does not introduce non-determinism but handles it:

Yes, that is what I mean.  It takes care of FIFO etc.  As was mentioned earlier, 
you have to consider the issue of how to dispose of the threads if you dispose 
of the queue.  But, if you don't have that worry, then it works simply.

Gregg Wonderly


More information about the Concurrency-interest mailing list