.NET有没有办法让父线程ID?没有办法、线程、NET、ID

由网友(百里情深不及你)分享简介:假设主线程生成一个新的线程T1,怎么能说我在T1运行code找到主线程的线程ID(使用C#)?Suppose the main thread is spawning a new thread t1, how can my code that runs on t1 find the thread id of the m...

假设主线程生成一个新的线程T1,怎么能说我在T1运行code找到主线程的线程ID(使用C#)?

Suppose the main thread is spawning a new thread t1, how can my code that runs on t1 find the thread id of the main thread (using c#)?

编辑: 我不控制设立新的线程。因此,我不能传递任何参数给线程。

I don't control the creation of the new thread. So I can't pass any parameters to the thread.

感谢。

推荐答案

您不能。

然而,你可能会考虑:

preFIX从父线程的线程ID的新线程的名称 创建您要产卵的方法构造需要从父线程ID
阅读全文

相关推荐

最新文章