Getting number of messages in MessageBox
Marek Janukowicz
marek at janukowicz.net
Mon Aug 5 23:16:32 PDT 2013
Ali Çehreli wrote:
> 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.
Well, while this could help a little, it's not really what I'm looking for.
I'd like to dump message counts for various threads periodically and see how
it fluctuates over time. With the solution you propose I could only check
how often a certain limit is hit.
--
Marek Janukowicz
More information about the Digitalmars-d-learn
mailing list