48

Possible Duplicate:
Calling Console.WriteLine from multiple threads

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

2
  • 1
    Deadlocks would be much less likely than race conditions (assuming that it's not thread-safe) Jan 27, 2011 at 3:45
  • 14
    It's more likIf it isn't threadsafe.ely to produce output like this. Jan 27, 2011 at 3:53

1 Answer 1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.