首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

问一下子动态tls有什么用

2013-11-09 
问一下动态tls有什么用?动态tls有四个API,运行了网上给的列子。不知道tls有什么用?[解决办法]参考TLS--线程

问一下动态tls有什么用?
动态tls有四个API,运行了网上给的列子。不知道tls有什么用?
[解决办法]
参考   TLS--线程局部存储
[解决办法]
是存放 线程 私有 变量的 地方
[解决办法]
可以放一些线程自己相关的数据等。
[解决办法]
Thread Local Storage (TLS) is the mechanism by which each thread in a given multithreaded process allocates storage for thread-specific data. In standard multithreaded programs, data is shared among all threads of a given process, whereas thread local storage is the mechanism for allocating per-thread data. 
[解决办法]
动态tls是dll用的.
exe用静态就行.
[解决办法]
设计一些库,并把线程相关的一些库需要的数据保存在tls中,使得对库的多线程调用互不影响

热点排行