[Issue 5806] std.concurrency : Need the count of a thread's message queue

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 22 18:04:32 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=5806



--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-22 18:04:31 PST ---
Welp, I don't think I know how to implement this, I'm not sure which one of
these is right:

return m_localMsgs;
return m_localBox.length;
return m_sharedBox.length;

Or whether there should be a synchronized(m_lock) around them.

A count might not even be necessary, but I would like to have a 'hasMessages'
property in a Tid to know whether to call `receive` or continue doing some
unrelated work in the function.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list