Individual fields cannot be marked as synchronized.
单独的成员变量是不能被标明为同步的。
So look, consider taking the advice when a small community accidentally comes together as synchronized advisors.
所以听着,试着接受这个建议当一个小团体给出的答案都偶然相同就像同步顾问一样。
The ReentrantLock class, which implements Lock, has the same concurrency and memory semantics as synchronized, but also adds features like lock polling, timed lock waits, and interruptible lock waits.
ReentrantLock类实现了Lock ,它拥有与 synchronized相同的并发性和内存语义,但是添加了类似锁投票、定时锁等候和可中断锁等候的一些特性。
The example program would benefit from such enhancements as keeping the buffers synchronized or checking if the complete buffer must be redrawn when contents are lost.
示例程序将受益于一些增强功能:如使缓冲区保持同步,或者检查当内容丢失时是否必须重新绘制整个缓冲区。
Similarly, as part of acquiring the monitor when entering a synchronized block, local caches are invalidated so that subsequent reads will go directly to main memory and not the local cache.
与此类似,作为获得监视的一部分,当进入一个同步块时,本地缓存失效,使之后的读操作直接进入主内存而不是本地缓存。
In light of our observation it seems as if we should be able to optimize access in the case where a thread is looping over a synchronized block of code.
根据我们的观察,我们似乎需要对一些锁的访问进行优化,比如线程执行的同步块代码在一个循环体中。
One well-known source has cited that a synchronized method call is as much as 50 times slower than an unsynchronized method call.
一个著名的资料来源就曾经引证说一个同步的方法调用比一个非同步的方法调用慢50倍。
But if the hashes differ, the out-of-date block is marked as out of sync, and subsequent synchronization ensures that the block is properly synchronized.
如果散列值不相同,将过期的数据块标记为不同步,随后的同步确保数据块是正确同步的。
All the user data is synchronized with the cloud, the local storage being used just as a cache.
所有的用户数据都与云中数据保持同步,本地存储仅仅用做缓存而已。
Ensure all data is synchronized between the disk volume pairs and are in a full-duplex state, as shown in Listing 17.
确保所有数据均在磁盘卷对之间同步,并且处于全双工状态,如清单17所示。
It is crucial to accurately identify which code block truly needs to be synchronized and to synchronize as little as possible.
准确地识别哪些代码真正需要同步并尽可能少地进行同步,这非常重要。
This is needed so that when the directories are synchronized again, the source and destination files can be compared and the list of differences determined as usual.
这样,当再次同步目录时,就可以像一般情况一样比较源和目标文件并判断出差异。
When a thread exits a synchronized block as part of releasing the associated monitor, the JMM requires that the local processor cache be flushed to main memory.
当线程为释放相关监视器而退出一个同步块时,J MM要求本地处理器缓冲刷新到主存中。
An entire application is stored as many simple metadata text files which are easily synchronized with a developer's preferred version control system.
整个应用程序被存储为许多简单的元数据文本文件,这些文件可以与开发人员钟爱的版本控制系统轻松同步。
Tivoli directory Integrator may be configured as a multi-directional feed so data that certain Profile updates made by users can be synchronized back to the source directory server and the hr system.
可以将TivoliDirectoryIntegrator配置为多方向提供,这样包含用户所提供的某些Profile更新的数据可以与源目录服务器和HR系统保持同步。
Once synchronized using the WebSphere Everyplace Client, the portlet is fully functional in both online and offline environments, as shown in the screen captures below.
一旦使用WebSphereEveryplace Client对portlet进行了同步,这个portlet便在联机环境和脱机环境中都有完整的功能,如下面的抓屏所示。
Gridscale tracks the copies that are synchronized as they respond to write transactions.
Gridscale跟踪在响应写事务时被同步的副本。
Multiple instances can be created even if you add a synchronized (this) block to the constructor call, as in Listing 4.
即使你为构造方法调用加上同步控制,多个实例的现象也会出现,见清单4。
The simulator has been configured as "on form Submission", which means the form is synchronized to the server when the form is submitted (provided there is a network connection).
模拟器已经配置为“onForm Submission”,这表示在提交表单时,表单将与服务器同步(假设已建立网络连接)。
"I think there are significant questions as to whether or not their clocks were synchronized correctly," Contaldi told Life's Little Mysteries, a sister site to LiveScience.
“我认为他们所采用时钟能否正确地同步,存在着明显的问题,”卡洛·康泰迪对LiveScience的一个姐妹站点《生活中的小秘密》说。
As long as you keep your tests and code synchronized (and that's the whole point of the practice), if a programmer wants to know what the system does, he or she can look at the tests.
只要您保持测试和代码的同步(这是实践的关键点),如果有程序员想知道系统能做什么,他或她可以参看测试。
Researchers have found that the brains of speakers and listeners become synchronized as they converse and that this "neural coupling" is key to effective communication.
研究者已经发现,言说者的大脑与倾听者的大脑在交谈时会变得协调一致,并且这种“神经耦合”对有效沟通很关键。
In general, strive to make your synchronized blocks as lean as possible, without harming thread safety.
一般而言,在保证线程安全的前提下要尽可能地简化同步语句。
The semantics of "correctly synchronized" programs should be as simple and intuitive as feasible.
“正确同步的”程序的语义应该尽可能简单直观。
The state of the model is synchronized frequently with the view, as shown in Figure 2.
模型的状态频繁与视图同步,如图2所示。
The Lock framework is a compatible replacement for synchronization, which offers many features not provided by synchronized, as well as implementations offering better performance under contention.
Lock框架是同步的兼容替代品,它提供了synchronized没有提供的许多特性,它的实现在争用下提供了更好的性能。
Other data, such as photos and calendar entries, will be synchronized between webOS devices with an online system called Synergy.
其他数据,比如照片和日常安排,在一个称作synergy的在线系统的帮助下都可以在webOS设备间实现同步。
Message Broker can keep packaged application systems synchronized with each other, as shown below.
MessageBroker能够使打包的应用程序系统保持彼此同步,如下所示。
Using the synchronized keyword with myMethod() you will, as expected, see a blocked count greater than zero from the ThreadInfo object associated with the thread.
在myMethod() 上使用synchronized关键字时,会看到与线程关联的ThreadInfo对象有一个大于0 的阻塞计数。
As more advanced JVMs have emerged, the cost of synchronization has decreased, but there is still a performance penalty for entering and leaving a synchronized method or block.
随着更高级的JVM的出现,同步的代价降低了,但出入synchronized方法或块仍然有性能损失。
应用推荐