[英]Threadpool - How to call a method (with params) in the main thread from a worker thread
[英]In c#, how to check the thread from threadpool is a worker thread or an I/O thread?
是否可以识别线程是工作者还是I / O.
我知道代码
Thread.CurrentThread.IsThreadPoolThread
这段代码是为了显示它是否是一个线程池线程,但似乎没有方法来显示它是否是一个工作线程。
我怎么检查呢? 可能吗?
除了它们所在的池之外,线程之间没有区别,如下所示: .NET中工作线程和I / O线程的简单描述
线程不知道它来自哪个池。 所以这是不可能的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.