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.