It's thread-safe and has a smaller footprint.
它线程安全,而且更节省资源。
Using a thread-safe wrapper for the data repository.
为数据存储库使用线程安全的包装器。
Listing 1 shows a non-thread-safe number range class.
清单1显示了一个非线程安全的数值范围类。
Listing 3 shows you how to use this thread-safe version.
清单3说明如何使用此线程安全版本。
One advantage of immutable classes is that they are thread-safe.
(不可变类的一个优点就是它们是线程安全的)。
IBinder methods must, therefore, be implemented to be thread-safe.
因此ibinder方法必须实现为线程安全的。
Objects that you put on the session should be thread-safe and serializable.
放到会话中的对象应该是线程安全的和可序列化的。
In situations where you know you need thread safety, use a thread-safe view.
在需要线程安全的情况下,请使用线程安全视图。
Moreover, it may be impossible to make a non-reentrant function thread-safe.
另外,或许不可能让某个不可重入的函数是线程安全的。
One common use is for storing a singleton of a type that is not thread-safe.
一种常见用法是用于存储非线程安全类型的单例。
Any read-only tree operation is thread-safe as long as there isn't any thread modifying it.
所有只读的树操作都是线程安全的,只要没有线程修改它。
Batch application developers write code that is thread-safe and executes on a single thread.
批处理应用程序开发人员可以编写线程安全的、且在单个线程中执行的代码。
The first condition disqualifies volatile variables from being used as thread-safe counters.
第一个条件的限制使volatile变量不能用作线程安全计数器。
If a caller wants to increment the foo property, the following code to do so is not thread-safe.
如果一个调用者想要增加foo属性值,以下完成该功能的代码就不是线程安全的。
Swing components must be accessed in the EDT, unless you call methods documented as thread-safe.
Swing组件必须在EDT中进行访问,除非您调用文档化为线程安全的方法。
Under the new memory model, this "fix" to double-checked locking renders the idiom thread-safe.
在新的内存模型中,对双重检查锁定的这个“修复”使 idiom 线程安全。
The DataMapRepository class presented previously and its base class LinkedHashMap are not thread-safe.
之前介绍过的datamaprepository类及其基类LinkedHashMap都不是线程安全的。
Consider a thread-safe container class - a data structure that guarantees thread safety to its clients.
可以考虑使用一个线程安全容器类—一个保证用户操作线程安全的数据结构。
It may be easier to manage the use of a non-thread-safe class than to try and make the class thread-safe.
管理非线程安全类的使用比试图使类成为线程安全的要更容易些。
In this article, you'll learn how to build a thread-safe data repository for keeping auto-saved form data.
在本文中,您将学习如何构建线程安全的数据存储库来自动保存表单数据。
Any access to the data repository is made through a thread-safe wrapper class named RepositoryWrapper.
对数据存储库的所有访问都是通过一个名为RepositoryWrapper的线程安全类实现的。
In its simplest mode it ACTS as a thread-safe queue in which consumers are blocked while the queue is empty.
它最简单的使用模式便是作为一个线程安全的队列,并且在队列为空时阻塞消费者。
While the JLS gives us tools with which we can make our programs thread-safe, thread-safety does not come free.
虽然JLS给了我们可以使我们的程序线程安全的工具,但线程安全也不是天上掉下来的馅饼。
Concurrent Collections make concurrent programming easier by providing thread-safe, well-tuned data structures.
并发Collections提供了线程安全、经过良好调优的数据结构,简化了并发编程。
The AuthorizedCalls bean (shown in Listing 13) provides thread-safe methods for managing the set of authorized calls.
Authorized Callsbean(见清单13)提供了一些线程安全的方法,用于管理这个经过授权的调用的集合。
The in-memory representation of a schema is defined as the schema class, which is immutable and therefore thread-safe.
模式的内存中表示被定义为schema类,该类是恒定的,因此也是线程安全的。
You can use the same XPath object on multiple DOM trees, though you should note that XPath objects are not thread-safe.
同一XPath对象可用于多个DOM树,但必须注意 XPath对象不是线程安全的。
Note that readdir is not thread-safe, because the returned structure is a static variable stored in the function library.
请注意,readdir不是线程安全的,因为所返回的结构是存储在函数库中的一个静态变量。
Note that readdir is not thread-safe, because the returned structure is a static variable stored in the function library.
请注意,readdir不是线程安全的,因为所返回的结构是存储在函数库中的一个静态变量。
应用推荐