Getting number of messages in MessageBox

Gabi galim120 at bezeqint.net
Tue Aug 6 01:13:43 PDT 2013


On Tuesday, 6 August 2013 at 07:47:10 UTC, Marek Janukowicz wrote:
> dennis luehring wrote:
>> the question is do the published counter then needs locking - 
>> and make
>> it slow for all - just for beeing getable?
>
> Good point - but I believe the code operating on the counter is 
> synchronized
> already, so synchronized getter would not really slow things 
> down.

I agree that this is much needed feature.
In python for example, the threaded Queue class has qsize() 
method that returns the APPROX size of the queue. Without it  my 
life would be much harder-I use it frequently.


More information about the Digitalmars-d-learn mailing list