Windows - 上下文切换发生时线程 ID 发生变化
当上下文切换(由于任何原因)发生时,线程 ID 会改变吗?
Do Thread Id's change when a context switch (due to any reason) happens?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
当上下文切换(由于任何原因)发生时,线程 ID 会改变吗?
Do Thread Id's change when a context switch (due to any reason) happens?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
来自 http://msdn.microsoft.com/en -us/library/ms683183(v=vs.85).aspx:
GetCurrentThreadId()
直到线程终止,线程标识符在整个系统中唯一标识线程。
From http://msdn.microsoft.com/en-us/library/ms683183(v=vs.85).aspx:
GetCurrentThreadId()
Until the thread terminates, the thread identifier uniquely identifies the thread throughout the system.
线程的线程 ID 不能更改。线程的 ID 在线程的生命周期中保持不变。
The thread ID of a thread cannot change. A thread's ID remains constant through the thread's lifetime.