--- In Boost-Users@yahoogroups.com, Albrecht Fritzsche
olivier_debels wrote:
msg* pop() { // Get next message out of the queue // While no message found ^^^ // Check if no other thread is working on such a messagetype // If not -> return this message // else -> get next message }
To check if no other thread is working on such a messagetype, we take a look in the map(threadId, message type).
But still, what buys you the threadId? if you would change the check to
Check if noone is working on such a messagetype
and possibly use a set
, what is missing than? Ali
I need to know when a message finishes too. So when doing a pop(),
I first adjust the map (remove the type this thread was working on).
If I just have a set