[Issue 6155] New: thread message boxes block infinitely with OnCrowding.block
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 14 13:33:01 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6155
Summary: thread message boxes block infinitely with
OnCrowding.block
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: edelkind+puremagic at gmail.com
--- Comment #0 from ari edelkind <edelkind+puremagic at gmail.com> 2011-06-14 13:28:21 PDT ---
Created an attachment (id=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.
--
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