Both threads will wait indefinitely for the lock on the other class loader, and so they become deadlocked.
两个线程都会无限期地等候另一个类装入器上的锁,所以它们就变成了死锁的。
This synchronized code block acquires the lock associated with the customer class object before it executes.
同步的代码块在执行之前需要与客户类对象相关的锁。
The application hangs because each thread owns a lock on one of the class loaders and wants the lock on the other class loader, as illustrated in the timeline diagram in Figure 2.
应用程序之所以挂起,是因为每个线程都拥有一个类装入器上的锁,并想得到另一个类装入器上的锁,如图2的时间线图所示。
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相同的并发性和内存语义,但是添加了类似锁投票、定时锁等候和可中断锁等候的一些特性。
Everything else was moved to a VM class, which is completely lock-free.
所有的东西都会迁移到VM类,这个类是完全无锁的。
For example, if the lock object is of class object, it may not be easy to search the code for references to it.
例如,如果锁对象的类别是Object,搜索代码以引用它可能不太容易。
The constructor for the file_lock class accepts the name of the file to be locked, and it's important to open the file before lock is invoked; otherwise, an exception will be thrown.
file_lock类的构造函数接受要锁定的文件的名称,一定要在调用lock之前打开文件;否则会抛出异常。
The main processor was a 16-bit avionics-class processor that incorporated two internal CPUs that executed instructions in lock-step.
主处理器是一个16 位的航空电子类处理器,它包含两个执行锁步 (lock-step)中指令的内部CPU。
The static lock associated with each class is unrelated to that of any other class, including its superclasses.
每个类所对应的静态锁和其他的类(包括其父类)没有任何的关系。
Static synchronization employs the lock possessed by the class object associated with the class the static methods are declared in.
静态同步使用的是静态方法锁声明的类对象所拥有的锁。
MEMS safety discriminator is a class of safety device for high consequence systems, also termed as micro lock, micro combination lock, micro discriminator or micro use control switch.
微机电安全密码锁是一类用于确保“要害系统”安全性的装置,也可称为微锁、微型组合锁、微型密码鉴别器或微型使用控制开关。
In March of this year, the issue gained national attention again when a teacher beat a girl and cut off a lock of her hair because she did not wear a hijab to class.
今年三月,埃及一名女孩儿未戴头巾上课而被老师殴打,这名老师还剪掉了女孩一缕头发。 此事使得这一问题再次引发国民关注。
In March of this year, the issue gained national attention again when a teacher beat a girl and cut off a lock of her hair because she did not wear a hijab to class.
今年三月,埃及一名女孩儿未戴头巾上课而被老师殴打,这名老师还剪掉了女孩一缕头发。 此事使得这一问题再次引发国民关注。
应用推荐