Invoking writeln() from a lot of threads running concurrently --> crash

Seb seb at wilzba.ch
Sat Dec 9 13:56:49 UTC 2017


On Saturday, 9 December 2017 at 09:38:05 UTC, IM wrote:
> Note that I didn't add any synchronizations around the 
> writeln() calls, should I? I assume the implementation *should* 
> synchronize access to std_out, no?
>
> Bug in phobos?

Yes, try using synchronized access. IIRC the implementation of 
LockingTextWriter isn't thread-safe.


More information about the Digitalmars-d mailing list