[concurrency-interest] Polling many queues with few threads

Jean Morissette jean.morissette666@videotron.ca
Wed, 24 Nov 2004 18:57:58 -0500

I would like to have your advice on one of my problem.  Suppose that we 
have N queues that are polled (not pooled) continously, in a round-robin 
schedule, by only M thread, where M < N.

The question is what we should do if all queues are empty?  I don't want 
to poll continously all the empty queues because its time consumming. 
Instead, I would like to wait until one of the queues become non-empty.

What are my options?

Best regards,