Very lightweight and non thread safe.
很轻量但是并不是线程安全的。
It is often the easiest way to render a stateful class thread-safe, or to encapsulate non-thread-safe classes so that they can safely be used in multithreaded environments.
它常常是把有状态类描绘成线程安全的,或者封装非线程安全类以使它们能够在多线程环境中安全地使用的最容易的方式。
Listing 1 shows a non-thread-safe number range class.
清单1显示了一个非线程安全的数值范围类。
On my parallel VM, a non-thread safe method (written in c) is invoked, at first, VM acquires GVL, and process such a method, and releases GVL.
在我的并行vm上,会调用一个线程不安全的方法(使用c编写)。首先,VM请求GVL,然后处理这个方法,接着释放GVL。
It may be easier to manage the use of a non-thread-safe class than to try and make the class thread-safe.
管理非线程安全类的使用比试图使类成为线程安全的要更容易些。
You should be aware that the cache object itself is thread safe, but if you cache a non-thread safe object in the cache that won't make the cached object itself automatically thread safe.
您应该意识到缓存对象本身是线程安全的,但是如果你在缓存中缓存不是线程安全对象,不会让缓存对象本身自动线程安全的。
You should be aware that the cache object itself is thread safe, but if you cache a non-thread safe object in the cache that won't make the cached object itself automatically thread safe.
您应该意识到缓存对象本身是线程安全的,但是如果你在缓存中缓存不是线程安全对象,不会让缓存对象本身自动线程安全的。
应用推荐