.netconsole.writeline

Calling Console.WriteLine from multiple threads


Why does Console.WriteLine work from multiple threads?


Solution

  • The console class handles the thread synchronization for you.

    From the documentation of Console:

    I/O operations using these streams are synchronized, which means multiple threads can read from, or write to, the streams.