Because each thread is waiting for a lock held by the other, a deadlock occurs.
因为每个线程都在等候对方持有的锁,所以就发生了死锁。
A single arrow indicates a thread contention: One thread is waiting for another thread to release a lock.
一支单独的箭头指出一个线程竞争:一个线程正在等候另一个线程释放一个锁。
When a request comes from a user to dump the data, each thread takes a lock and dumps it to a central place.
当收到来自用户的转储数据的请求时,每个线程获得一个锁,并将其转储到中心位置。
Synchronized methods and blocks allow a thread to lock an object on entry and unlock the object on exit (to the method or block).
同步的方法和代码块允许线程在入口处锁定对象并在出口处解锁(针对方法或代码块)。
A runtime thread must acquire this lock before invoking the type constructor.
运行库线程必须在调用类型构造函数之前获得此锁。
Start a child thread that evaluates the lock request.
启动一个对锁请求进行处理的子线程。
With locking, if one thread attempts to acquire a lock that is already held by another thread, the thread will block until the lock becomes available.
使用锁定,如果一个线程试图获取其他线程已经具有的锁定,那么该线程将被阻塞,直到该锁定可用。
If spinning succeeded on that same lock object in the recent history and the thread holding the lock is running, then spinning is likely to succeed again.
如果在同一个锁对象上,自旋刚刚成功过,并且持有锁的线程正在运行中,那么自旋很有可能再次成功。
Use the same thread to lock and unlock a file.
使用相同的线程来锁定和解锁文件。
This only succeeds if another thread does not already have the lock, in which case the current thread is blocked.
只有在其他线程不拥有锁的情况下才会成功,如果其他线程拥有锁,当前线程就被阻塞。
The thread will only release the lease if another thread attempts to acquire the lock.
如果另一个线程在尝试获取锁,那么循环线程只需要释放契约就可以了。
A slow lock is owned by another thread and must be relinquished by that other thread before it can be acquired.
慢锁由另一个线程持有,在可以被请求之前必须被那另一个线程释放掉。
Having a single thread pool could cause significant lock contention.
使用单独一个线程池可能会导致严重的锁争用。
As you may have guessed, the POSIX threads library will grant a lock without having put the thread to sleep at all if a thread tries to lock an unlocked mutex.
可以推测到,当线程试图锁定一个未加锁的互斥对象时,POSI x线程库将同意锁定,而不会使线程进入睡眠状态。
The second lane is thread, indicating in which thread lock contention occurs.
第二列是线程,表明锁竞争发生哪个线程。
The system detects that the P3 thread is holding a lock required by the P1 thread and elevates its priority to P1 until the lock is released.
如果系统检测到P 3线程正在持有一个P 1线程需要的锁,则会把P 3线程的优先级置为P1,直到它释放了锁。
As a result, each thread ends up waiting for a lock held by the other thread.
结果,每一个线程都会等待另一个线程所保持的锁。
In the thread View, vertical arrows point from a thread requesting a lock to the thread that holds the lock.
在线程视图中,垂直的箭头从请求锁的线程,指向持有锁的线程。
Uncontested unlock operations return a locked mutex to the thread lock cache.
非争用的解锁操作将一个锁定的互斥锁返回给线程锁定缓存。
If the NHRT is delayed when trying to acquire such a lock while the thread owning the lock is delayed by garbage collection, then the NHRT is indirectly delayed by garbage collection as well.
如果NHRT在尝试获取这类锁时被延迟了,而且拥有该锁的线程被垃圾收集延迟了,那么垃圾收集也会间接地延迟NHRT。
Because thread 1 currently holds this lock, thread 2 blocks.
由于线程1目前持有此锁,线程2被阻断。
The P1 thread then needs the same object but cannot acquire the lock until the P3 thread has released it.
P1线程需要同一个对象上的锁,但是在P3线程释放它之前,P1无法得到锁。
The shorter the time a thread holds a given lock, the lower the probability that another thread will request it while the first thread is holding it.
一个线程占用一个给定锁的时间越短,另一个线程在该线程仍占用锁时请求该锁的可能性就越小。
If a lock is acquired recursively, the requesting thread already owns it.
如果锁是以递归方式被请求,那么发出请求的线程已经持有了它。
Priority inversion is a condition where a high-priority thread is blocked on a lock held by a low-priority thread.
优先级反转指的是阻塞高优先级线程的锁由低优先级线程持有。
Biasing a lock to a thread means that the thread is not required to release the lease on the lock.
将锁偏向于一个线程,意味着该线程不需要释放锁的契约。
But we have to do this inside a new thread; otherwise, we'll lock the entire Workbench.
但是我们必须在一个新线程中做这项工作;否则,我们将锁定整个Workbench。
When using a JUC lock, a thread will "stop" execution in the following two cases.
当在程序中使用JUC锁的时候,线程会在下面两种情况下“停止”执行。
If thread two runs, it'll want to lock count_mutex, which is held by thread one.
如果线程2要运行,它就要锁定count _ mutex,而这个互斥量已经被线程1占有了。
While still holding the mutex lock, our thread will call pthread_cond_wait(&mycond,&mymutex).
锁定互斥对象时,线程将调用 pthread_cond_wait(&mycond,&mymutex)。
应用推荐