Do not include synchronized methods into a loop structure.
不要将同步方法放到循环结构中。
To reduce contention in the JVM and operating system, use synchronized methods only when feasible.
为了减少JVM和操作系统中的争用,应该只在可行的情况下才使用同步方法。
As described below, the locks associated with Class objects are used in static synchronized methods.
正如下所述,在静态同步方法中用的就是类对象的锁。
These locks do not require block structures, so they are more flexible than synchronized methods or statements.
这些锁不需要使用语句结构,所以它们比同步方法或语句更灵活。
Synchronized methods and blocks allow a thread to lock an object on entry and unlock the object on exit (to the method or block).
同步的方法和代码块允许线程在入口处锁定对象并在出口处解锁(针对方法或代码块)。
Beware that the way the generated proxy creates a Call object depends on whether you have chose to use synchronized methods or not.
请注意,生成的代理创建Call对象的方法取决于您是否选择了使用同步方法。
If a class has both synchronized and nonsynchronized methods, multiple threads can still access the nonsynchronized methods of the class!
如果类具有同步方法和非同步方法,则多个线程仍然能够访问该类的非同步方法!
If you chose to use synchronized methods (the default), the proxy creates a single call object upon instatiation, then uses it for every method.
如果您选择了使用同步方法(缺省值),代理将根据实例化创建一个单独的call对象,然后为每个方法使用该对象。
In this case, the object is a class called JLAsink that contains two synchronized methods, one for setting a piece of data and one for retrieving it.
本例中,该对象就是一个名为JLAsink的类,该类包含两个同步的方法,一个用于设置数据块,一个用于检索该数据块。
If the problem remains a mystery after analyzing the PMI data, a set of thread dumps of the JVM often pinpoints synchronized methods and other common problems.
如果在评测pmi数据以后,仍然没有找到问题所在,JVM的一些线程堆经常能定位同步方法和其他常见问题。
In this installment of the 5 things series, I introduce some of the subtler aspects of multithreaded programming with synchronized methods, volatile variables, and atomic classes.
在这期的5件事系列中,我将通过同步方法、volatile变量和原子类介绍多线程编程的一些更隐晦的方面。
Only methods or code blocks can be marked "synchronized".
只有方法和代码块能被同步标记。
A synchronized call to an empty method may be 20 times slower than an unsynchronized call to an empty method, but how often do we call empty methods?
对一个空方法的同步调用可能要比对一个空方法的非同步调用慢20倍,但我们多长时间才调用一次空方法呢?
The information in table 1 tells us that those methods are synchronized.
表1的信息告诉我们这些方法都是同步的。
Note that all the methods, even get(), need to be synchronized for the class to be thread-safe, to ensure that no updates are lost, and that all threads see the most recent value of the counter.
注意所有方法,甚至需要同步get(),使类成为线程安全的类,从而确保没有任何更新信息丢失,所有线程都看到计数器的最新值。
Recall that the methods of the Vector class are nearly all synchronized.
回想一下,vector类的方法几乎都是同步的。
In WebSphere Process Server V7, the method to claim a task USES a query table and combines the query and claim methods previously used to eliminate the need for the synchronized block.
在WebSphereProcessServerv 7中,声明任务的方法是用一个查询表,并结合早期用于消除同步块需求的查询和声明方法。
Here, the accessor methods for user and service data are synchronized, which means that they are synchronizing on the AttributesStore object.
这里,用户和服务数据的访问器方法是同步的,这意味着它们在AttributesStore对象上同步。
To ensure that your implementation is thread-safe, a class that implements this interface should use either the synchronized keyword on the methods or synchronized blocks within the methods.
为了确保实现是线程安全的,实现该接口的类应该在方法上使用synchronized关键字,或者在方法内部使用同步锁。
The six checked*() methods work similar to the six synchronized*() and unmodifiable*() methods.
其中6 个checked*()方法工作起来与 6 个synchronized*()和unmodifiable*() 方法类似。
Methods: Aerial performances of diving are captured using two synchronized DV cameras, which are controlled by a motion capture software implanted in a notebook PC.
方法:用安装于笔记本电脑的运动采集软件及其相连接的两台DV摄像机同步采集三米跳板跳水空中动作。
Furthermore, if static data are synchronized, calls between static methods that alter state can result in deadlocks or redundant synchronization, adversely affecting performance.
此外,如果同步静态数据,更改状态的静态方法间的调用可导致死锁或冗余同步,从而降低性能。
Methods that are not synchronized may still execute at any time, even if a synchronized method is in progress.
如果一个同步方法正在执行中,其他的非同步方法也可以在任何时候执行。
The results of experiments show that the methods are effective to overcome the influence of jamming on synchronized sampling based on GPS.
试验结果表明,该方法可有效地克服干扰信号对GPS同步采样装置的影响。
The methods to amplify the synchronized error and to decrease the cross correlation are proposed to generate the encryption variables which are very sensitive to parameters.
提出同步误差放大、基波缩减的方法,获取对参数变化敏感、互相关性小的加密变量。
When multiple threads can make calls to the properties and methods of a single object, it is critical that those calls be synchronized.
当多个线程可以调用单个对象的属性和方法时,对这些调用进行同步处理是非常重要的。
The start from introduction of the general characteristic formula of trigger, and explains the theory and methods on analyzing as-synchronized sequential circuit. Examples are also given.
从介绍触发器广义特性方程入手,阐述了应用它分析异步时序电路的原理和方法,并举例说明了应用。
The start from introduction of the general characteristic formula of trigger, and explains the theory and methods on analyzing as-synchronized sequential circuit. Examples are also given.
从介绍触发器广义特性方程入手,阐述了应用它分析异步时序电路的原理和方法,并举例说明了应用。
应用推荐