ManagedThreadID有多独特? [英] How unique is ManagedThreadID?

查看:169
本文介绍了ManagedThreadID有多独特?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于ManagedThreadID,MSDN说:

For ManagedThreadID, MSDN says:

获取当前托管线程的唯一标识符.

Gets a unique identifier for the current managed thread.

独特"在什么情况下适用?

In what context does "unique" apply?

每个过程都唯一吗?
每个应用程序域?
每台机器?
每个.NET运行时? (如果我同时运行MS.NET和 Mono )

Is this unique per process?
Per application domain?
Per machine?
Per .NET runtime? (if I have both MS.NET and Mono running)

推荐答案

在线程的生命周期内,每个进程的线程ID是唯一的.线程终止后,其编号可以重复使用.

Thread ID is unique per process during a thread's lifecycle. After the thread terminates, its number can be reused.

这篇关于ManagedThreadID有多独特?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆