Very lightweight and non thread safe.
很轻量但是并不是线程安全的。
Consider for example usage of the thread safe StringBuffer.
举例来说,考虑一下线程安全的StringBuffer的用法。
Library functions have dire warnings that they may not be "thread safe."
调用库函数时经常会遇到一些“线程不安全”的可怕警告。
The object pool needs to keep track of the state of each object and to be thread safe.
对象池需要跟踪每个对象的状态,而且应该是线程安全的。
Compass: A thread safe instance used to open Compass Sessions for single thread usage.
Compass:为单线程使用,创建线程安全的实例来打开Compass Seesion。
Indexing and searching are not only thread safe, but process safe. What this means is that.
建立索引和搜索不是线程级安全的,但是是进程级安全的。
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.
可以考虑使用一个线程安全容器类—一个保证用户操作线程安全的数据结构。
However, the query parser is not thread safe, so each thread using the index should have its own query parser.
不过怎样,查询刨析器不是线程级安全的,所以每个使用索引的线程都需要有自己的查询刨析器。
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.
由于传播采用有状态方式跟踪调用了哪些(依次不太特定的)规则,所以分派器不是线程安全的。
Some classes retain state information from one method invocation to the next, and it is difficult to make such classes thread-safe in any practical way.
有些类保留从一个方法调用到下一个方法调用的状态信息,要在实践中使这样的类成为线程安全的是困难的。
You may have occasionally pondered whether to synchronize an entire method call or only the thread-safe subset of that method.
您可能偶尔会思考是否要同步化这个方法调用,还是只同步化该方法的线程安全子集。
One advantage of immutable classes is that they are thread-safe.
(不可变类的一个优点就是它们是线程安全的)。
Objects that you put on the session should be thread-safe and serializable.
放到会话中的对象应该是线程安全的和可序列化的。
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 its simplest mode it ACTS as a thread-safe queue in which consumers are blocked while the queue is empty.
它最简单的使用模式便是作为一个线程安全的队列,并且在队列为空时阻塞消费者。
Sometimes, it is very difficult to make a class thread-safe without compromising its functionality, ease of use, or performance.
有时,要在不影响类的功能、易用性或性能的情况下使类成为线程安全的是很困难的。
To support registering listeners from different threads, whatever mechanism is used to store and manage the list of active listeners must be thread-safe.
要支持从不同线程登记侦听器,那么不管用什么机制存储和管理活动侦听器列表,这个机制都必须是线程安全的。
There is no straightforward way to make the code in Listing 1 thread-safe, making this idiom an accident waiting to happen.
没有直观的途径来使清单1中的代码是线程安全的,这使这种语言风格成为了一种等待时机发生的事故。
They all output the same value illustrating that this is a thread-safe generic way to create singletons.
所有线程都返回相同的值,这说明这是一个线程安全的使用泛型来实现的单态模式。
Because these methods might be called from any number of threads at the same time, they too must be implemented to be thread-safe.
因为这些方法可能会从很多线程同时调用,它们也必须实现为线程安全的。
In this article, you'll learn how to build a thread-safe data repository for keeping auto-saved form data.
在本文中,您将学习如何构建线程安全的数据存储库来自动保存表单数据。
Listing 3 shows you how to use this thread-safe version.
清单3说明如何使用此线程安全版本。
Batch application developers write code that is thread-safe and executes on a single thread.
批处理应用程序开发人员可以编写线程安全的、且在单个线程中执行的代码。
Many people are betting on functional programming, with its emphasis on immutable objects and their inherently thread-safe properties.
很多人现在都投身于函数式编程的世界,由于它们具有不可变的对象,以及与生俱来的线程安全属性。
There is no straightforward way to make the code in Listing 1 thread-safe, making this idiom an accident waiting to happen.
没有什么简单的办法可用来把清单1中的代码变成线程安全的,这使得这一惯用技法变成了一个在等待时机发生的事故。
There is no straightforward way to make the code in Listing 1 thread-safe, making this idiom an accident waiting to happen.
没有什么简单的办法可用来把清单1中的代码变成线程安全的,这使得这一惯用技法变成了一个在等待时机发生的事故。
应用推荐