.net 从多个线程调用 Console.WriteLine
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1079980/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Calling Console.WriteLine from multiple threads
提问by Reed Copsey
Why does Console.WriteLine work from multiple threads?
为什么 Console.WriteLine 从多个线程工作?
回答by Reed Copsey
回答by Jure ?pik
There is a bug in .NET 4.5 CLR which makes Console.WriteLine notwork from multiple threads if you use Console.ReadKey. It is fixed in some Windows versions, but in 8.1 Windows Update does not find it yet.
.NET 4.5 CLR 中存在一个错误,如果您使用 Console.ReadKey ,它会使 Console.WriteLine无法从多个线程工作。它在某些 Windows 版本中已修复,但在 8.1 Windows Update 中尚未找到。
使用 Console.Writeline() 或 Console.Write() 时,在多线程 C# 控制台应用程序中很少挂起
Using Console.WriteLine in a Timer why it would appear to exit?
回答by Chris Ballance
Multiple threads write to the same output when using Console.WriteLine, generally your screen by default.
使用 时Console.WriteLine,多个线程写入相同的输出,默认情况下通常是您的屏幕。

