[concurrency-interest] Multi-Reader One-Writer Queue

Jean Morissette jean.morissette666 at videotron.ca
Fri Sep 2 16:19:11 EDT 2005

    I'm developing an application where a single writer thread must send 
messages to many reader thread.  The particularity is that a message 
must be read by all readers before being discarded.  Also, low memory 
consomption is an important requirement.  To achieve that, I'm thinking 
to create an array-based custom queue where each reader is in fact a 
queue proxy that keep its "dequeue pointer"  in the array.  Only the 
last reader of an element will remove it from the array.  However, I'm 
wondering how to determine efficiently who is the last reader during 
dequeue operation?

Is this the best way to accomplish this?  Any advices would be appreciated.

More information about the Concurrency-interest mailing list