Getting number of messages in MessageBox

Ali Çehreli acehreli at yahoo.com
Mon Aug 5 19:31:43 PDT 2013


On 08/05/2013 04:18 PM, Marek Janukowicz wrote:
> I'm using std.concurrency message passing and I'd like to check which thread
> might be a bottleneck. The easiest would be check number of messages piled
> up for each of them, but I could not find a way to do that. Is it possible?
> Every detail about MessageBox seems to be hidden...

Would setMaxMailboxSize() be helpful?

void setMaxMailboxSize(Tid tid, size_t messages, bool function(Tid) 
onCrowdingDoThis);

You can set a limit (perhaps that is lower than normal operation) and 
report whenever a particular Tid's MessageBox gets full.

Ali



More information about the Digitalmars-d-learn mailing list