Windows - 上下文切换发生时线程 ID 发生变化

发布于 2024-12-27 22:40:58 字数 36 浏览 4 评论 0原文

当上下文切换(由于任何原因)发生时,线程 ID 会改变吗?

Do Thread Id's change when a context switch (due to any reason) happens?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深海里的那抹蓝 2025-01-03 22:40:58

来自 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.

柠栀 2025-01-03 22:40:58

线程的线程 ID 不能更改。线程的 ID 在线程的生命周期中保持不变。

The thread ID of a thread cannot change. A thread's ID remains constant through the thread's lifetime.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文