我在这个链接上阅读了有关 System.Threading.DispatcherObject 类型的信息 http://msdn.microsoft.com/en-us/library/ms750441.aspx
文章提到了逻辑线程和物理线程之间的一对一关系。这是文章的片段:
During the design phase of WPF, the goal was to move to a single thread of execution, but a non-thread "affinitized" model. Thread affinity happens when a component uses the identity of the executing thread to store some type of state. The most common form of this is to use the thread local store (TLS) to store state. Thread affinity requires that each logical thread of execution be owned by only one physical thread in the operating system, which can become memory intensive
有人可以吗。解释逻辑线程与物理线程之间的区别是什么?
最佳答案
本地线程是运行时内的线程。该线程比成熟的物理线程更轻量级,适用于更轻量级的进程。物理线程是处理器上下文切换到并处理的线程。随着操作系统跟踪它,它有更多与之关联的元数据。涉及更多细节,但这是一个快速概述。
在这种情况下,物理线程将在内部包含这些逻辑“虚拟线程”。
关于c# - 逻辑线程 vs 物理线程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18857107/