Is this a good idea?

Peter Alexander peter.alexander.au at gmail.com
Sat Sep 1 17:08:25 UTC 2018


On Saturday, 1 September 2018 at 16:20:11 UTC, Dr.No wrote:
> why move flush to outside the synchronized block?

flush should be thread safe. In general, yiu want as little code 
as possible to run under the lock. Not that important though.

> trying out this approach I found to be ok except in some cases, 
> the output look like that:
>
>...
>
> also there's that extra ♪◙ character. Thos sounds memory 
> violation somewhere.
> This only happens when using parallel. Any guess what's 
> possibily happeing?

Hard to say without seeing code. Agree it looks like a race.



More information about the Digitalmars-d-learn mailing list