48

Possible Duplicate:
Calling Console.WriteLine from multiple threads

Just want to know if multiple threads call Console.WriteLine, will it cause a deadlock?

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
user496949
  • 83,087
  • 147
  • 309
  • 426

1 Answers1

67

It's safe! From the .NET API browser:

Console I/O Streams

[...]

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

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
ClosureCowboy
  • 20,825
  • 13
  • 57
  • 71