Does Console.WriteLine block?

Viewed 25185

Does Console.WriteLine block until the output has been written or does it return immediately?

If it does block is there a method of writing asynchronous output to the Console?

8 Answers

Since .NET Framework 4.5 (i.e. a long time ago) you've been able to avoid blocking the current thread with:

await Console.Out.WriteLineAsync("Hello, non-blocking, world!");
Related