Very lightweight and non thread safe.
很轻量但是并不是线程安全的。
Consider for example usage of the thread safe StringBuffer.
举例来说,考虑一下线程安全的StringBuffer的用法。
The object pool needs to keep track of the state of each object and to be thread safe.
对象池需要跟踪每个对象的状态,而且应该是线程安全的。
It is designed to be thread safe (though this is not really true yet), and Multi-VM capable.
它被设计成线程安全的(尽管还没有达到真正的线程安全),并能支持多个虚拟机。
The index writer however, is thread safe, so you can update the index while people are searching it.
而索引写者是线程级安全的,所以你能在人们搜索它时更新索引。
Making a class thread safe requires additional care during the implementation and testing of the class.
使一个类线程安全需要在实现和测试该类时非常小心。
Consider a thread-safe container class - a data structure that guarantees thread safety to its clients.
可以考虑使用一个线程安全容器类—一个保证用户操作线程安全的数据结构。
In this example, I don't focus on other issues related to this pattern, such as synchronization to make it thread safe.
在此实例中,我并没有针对其他与此模式相关的问题,如保持同步以确保线程安全。
You should also remember that static classes that preserve state between method calls should be made thread safe by default.
您还应该记得,在方法调用之间保留状态的静态类在默认情况下应该是线程安全的。
Because of the stateful way propagation tracks which (successively less specific) rules have been called, a dispatcher is not thread safe.
由于传播采用有状态方式跟踪调用了哪些(依次不太特定的)规则,所以分派器不是线程安全的。
Since it is thread safe by design, you might cache it in a public static final variable, or wrap it in a singleton pattern after creation for later access.
因为根据设计它是线程安全的,创建它之后可以把它缓存在一个公共静态最终变量中,或者包装在单实例模式中以供以后访问。
A primary concern in multithreaded programming is to make sure the program runs correctly — thread safe — in a system where multiple threads are executing.
多线程编程中的一个主要考虑是确保程序在执行多线程的系统中正确地——线程安全地——运行。
On the surface it looks as though lock elision allows us to write thread safe code without any synchronization penalty for using in cases where it really wasn't needed.
从表面上看,锁省略似乎可以允许我们不必忍受同步带来的负担,就可以编写线程安全的代码了,前提是在同步的确是多余的情况下。
This instance is used for all messages that are sent into the partition, making members of this class thread safe and providing the opportunity to cache required resources.
这个实例被用于发送到该分区中的所有消息,使这个类的成员线程安全并提供缓存必要资源的机会。
Any objects touched by listeners should either be thread safe or, for thread-confined objects such as Swing models, the listener should be confident that it is executing in the right thread.
侦听器涉及的任何对象,都应当是线程安全的,或者是受线程约束的对象(例如Swing模型),侦听器应当确定自己正在正确的线程中执行。
In this article, you'll learn how to build a thread-safe data repository for keeping auto-saved form data.
在本文中,您将学习如何构建线程安全的数据存储库来自动保存表单数据。
A class that is not thread-safe can often be used safely in a multithreaded program as long as you ensure that instances of that class used by one thread are not used by other threads.
非线程安全类通常可以安全地在多线程程序中使用,只要您能确保一个线程所用的类的实例不被其它线程使用。
One advantage of immutable classes is that they are thread-safe.
(不可变类的一个优点就是它们是线程安全的)。
Listing 3 shows you how to use this thread-safe version.
清单3说明如何使用此线程安全版本。
Objects that you put on the session should be thread-safe and serializable.
放到会话中的对象应该是线程安全的和可序列化的。
Using a thread-safe wrapper for the data repository.
为数据存储库使用线程安全的包装器。
Batch application developers write code that is thread-safe and executes on a single thread.
批处理应用程序开发人员可以编写线程安全的、且在单个线程中执行的代码。
IBinder methods must, therefore, be implemented to be thread-safe.
因此ibinder方法必须实现为线程安全的。
You may have occasionally pondered whether to synchronize an entire method call or only the thread-safe subset of that method.
您可能偶尔会思考是否要同步化这个方法调用,还是只同步化该方法的线程安全子集。
Sometimes, it is very difficult to make a class thread-safe without compromising its functionality, ease of use, or performance.
有时,要在不影响类的功能、易用性或性能的情况下使类成为线程安全的是很困难的。
In its simplest mode it ACTS as a thread-safe queue in which consumers are blocked while the queue is empty.
它最简单的使用模式便是作为一个线程安全的队列,并且在队列为空时阻塞消费者。
The first condition disqualifies volatile variables from being used as thread-safe counters.
第一个条件的限制使volatile变量不能用作线程安全计数器。
The DataMapRepository class presented previously and its base class LinkedHashMap are not thread-safe.
之前介绍过的datamaprepository类及其基类LinkedHashMap都不是线程安全的。
In some situations, the methods you implement might be called from more than one thread, and therefore must be written to be thread-safe.
在某些场合,方法可能会从不止一个线程中被调用,因此这些方法必须是写成线程安全的。
In some situations, the methods you implement might be called from more than one thread, and therefore must be written to be thread-safe.
在某些场合,方法可能会从不止一个线程中被调用,因此这些方法必须是写成线程安全的。
应用推荐