17 Dec
2002
17 Dec
'02
10:06 a.m.
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