Comment #0 by edelkind+puremagic — 2011-06-14T13:28:21Z
Created attachment 997
Code to demonstrate OnCrowding.block deadlock
When std.concurrency.setMaxMailboxSize(..., OnCrowding.block) is used, and the
mailbox fills (thus calling m_notFull.wait() ), the corresponding notify
procedure is never called, and the threads deadlock.
This is due to the fact that m_count is not always incremented correctly, and
can become 0xffffffff (-1). When mboxFull() checks the length of the list, it
sees an astronomical size, thus never returns false.
A test case is attached (messagebox.d).
I will attach a patch as well.
Comment #1 by edelkind+puremagic — 2011-06-14T13:33:11Z
Created attachment 998
patch to fix OnCrowding.block deadlock issue
Comment #2 by edelkind+puremagic — 2011-07-08T13:19:51Z