净:逻辑线程和线程本地存储? [英] .Net: Logical thread and Thread Local Storage?

查看:148
本文介绍了净:逻辑线程和线程本地存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在读有关CallContext中类(的http://msdn.microsoft.com/en-us/library/system.runtime.remoting.messaging.callcontext.aspx).该文件说,一些有关逻辑线程和线程本地存储。

I'm reading about the CallContext class (http://msdn.microsoft.com/en-us/library/system.runtime.remoting.messaging.callcontext.aspx). The documentation says something about "logical threads" and "Thread Local Storage".

什么是逻辑线程,我不知道,存在着多种类型的线程?

What's a logical thread, I didn't know that there existed multiple kinds of threads?

什么是线程本地存储,它是一个类或某种形式的原则?

What's a Thread Local Storage, is it a class or a principle of some kind?

我一直没能找到它在MSDN上,但我敢肯定,它是有一些地方,所以任何链接将是巨大的: - )

I have not been able to find it in on MSDN, but I'm sure it is there some place, so any links would be great :-)

推荐答案

一个逻辑线程是一个概念,可以追溯到COM,OLE和RPC也适用于远程方案。逻辑线程跟踪同步调用的执行,因为它在各种界限,包括COM的公寓,RPC和远程处理边界的传播。

A logical thread is a concept that dates back to COM, OLE and RPC and also applies to remoting scenarios. A logical thread traces the execution of a synchronous call as it propagates across various boundaries including COM apartments, RPC and remoting boundaries.

这是一个非常重要的概念,当你考虑到两个完全不相关的组件可能会尝试在同一界面做操作的可能性。技术如COM必须能够一个新的呼叫进入其边界(公寓)和一个完全无关的电话,以保证像同步执行的东西区别开来。

This is a really important concept when you consider the possibility that two completely unrelated components might attempt to do operations in the same boundary. Technologies such as COM must be able to distinguish between a new call entering their boundary (apartment) and a completely unrelated call in order to guarantee things like synchronous execution.

逻辑线程是相当困难的小SO后解释。我recomendation是谷歌/冰的RPC逻辑线程,并从那里

Logical threads are fairly difficult to explain in a small SO post. My recomendation is to google / bing for "RPC logical thread" and go from there

  • <一个href="http://pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.euvmo00%2Feuva3a00124.htm" rel="nofollow">http://pic.dhe.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.euvmo00%2Feuva3a00124.htm

线程本地存储是相当的容易解释。这是一个存储单元,这是唯一的在每个线程。其基本思路是,你首先分配的关键。然后,您可以查询每个单独的线程与该键的项目。每个线程将举行一个不同的空间,开放的关键,因此有一个单独的值。

Thread Local Storage is quite a bit easier to explain. It's a storage unit that is unique for every thread in a process. The basic idea is that you first allocate a key. You can then query each individual thread for an item with that key. Each thread will hold a different space open for the key and hence have a separate value.

这篇关于净:逻辑线程和线程本地存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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