“ThreadLocal”可以造什么句,ThreadLocal造句

来源:语文精选馆 2.56W
ThreadLocal造句

不用说,ThreadLocal的*能是相当差的。

The next-fastest data structure is HashMap, followed by ThreadLocal (essentially, a specialized hash table in which the current thread is the key).

Instead, the thread class was modified to support ThreadLocal by adding an instance variable to thread that holds a HashMap mapping thread-local variables to their values for the current thread.

With these new improvements, ThreadLocal should be faster than other techniques such as pooling.

更慢一点儿的数据结构是HashMap,然后是ThreadLocal(这基本上是一个以当前线程作为键的特殊散列表)。

有了这些提高,ThreadLocal应该比其它技术,如用池,更快。

相反地,人们通过给Thread添加一个实例变量(该变量用于保存当前线程的从线程局部变量到它的值的映*的HashMap)来修改thread类以支持ThreadLocal

热门标签