Summary: thread message boxes block infinitely with
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos

--- Comment #0 from ari edelkind <> 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:
------- You are receiving this mail because: -------

Reply via email to