https://issues.dlang.org/show_bug.cgi?id=14953

--- Comment #7 from Sean Kelly <[email protected]> ---
I think there's already a bugzilla for getting the mailbox size.  It's
definitely come up before, and would be a trivial change.  The way the
MessageBox code works is it has a thread-local queue and then a shared queue. 
When a match isn't found in the thread-local queue the shared queue is moved to
the local queue and the match continues on the new messages.  All of these
operations (empty queue, get size, etc) would operate on the local queue only. 
Touching the shared queue in any way requires acquiring a mutex, which is
generally not what you want for these operations.  In essence, messages in the
shared queue are messages that "arrived" after your operation was executed.

--

Reply via email to