Otherwise, you can use the "recursive" mutex type, which allows the holder of the lock to lock the same mutex multiple times.
另外,您还可以使用“递归”类型的互斥量,这种互斥量允许对同一个互斥量锁定多次。
The lock escalations, lock timeouts and deadlocks will indicate some potential problems in your system or application.
锁升级、锁超时和死锁将表明系统或应用程序中存在某些潜在问题。
Another example is priority inheritance, a locking policy that defines how lock synchronization is managed when a lock is contested.
另一个例子是优先级继承,它是一种锁定策略,定义了锁竞争时如何管理锁同步。
The readers are protected by a lock, but the lock is a standard one, and keys can be bought on the Internet: besides, the keys circulate among election officials.
识读卡由一个锁保护,但问题是这个锁是一把标准锁,钥匙能在网上得到;除此以外,这些钥匙还在这些选举官员间串换。
In those cases only one of the lock owners is shown in the lock timeout report.
在这些情形下,锁定超时报告中只会显示一个锁持有者。
When the number of locks held by any one application reaches this percentage of the total lock list size, lock escalation occurs for the locks held by that application.
当任何一个应用程序所持有的锁数量达到整个锁列表大小的这个百分比时,对该应用程序所持有的锁进行锁升级。
If after replacing these with a single table lock, the MAXLOCKS value is no longer exceeded, lock escalation stops.
如果用一个表锁替换这些行锁,将不再会超出maxlocks值,那么锁升级就会停止。
The LOCK TABLE command can be used to lock a table instead of using the default row locking.
可使用LOCKTABLE命令来锁定一个表,而不是使用缺省的行锁定。
Alternatively, you can click on the lock icon in the toolbar to lock them (the icon will then change to locked).
也可以通过单击工具栏上的锁图标锁住它们(图标会变成锁住的锁)。
In this case, a logical lock (not a physical database lock) is used to flag that a row is in use for a long-term duration.
在本方案中,通过逻辑锁(而不是物理锁)来对在较长时间中使用的数据行进行标记。
When a table holds an IX lock, the lock owner and concurrent applications can read and update data in that table.
当表持有IX锁时,锁拥有者和并发应用程序可以读和更新该表中的数据。
Priority-based FIFO behavior — as in the earlier synchronization example where the highest-priority thread is chosen to execute next — also applies to the queues of lock contenders and lock waiters.
基于优先级的FIFO行为——在前面的同步示例中,将接着执行具有最高优先级的线程——也适用于锁争用者和锁等待者的队列。
The global lock cache feeds the per-thread lock caches.
全局锁缓存将其内容提供给单线程锁缓存。
In the thread View, vertical arrows point from a thread requesting a lock to the thread that holds the lock.
在线程视图中,垂直的箭头从请求锁的线程,指向持有锁的线程。
Lock contention occurs when a lock is currently in use and another thread tries to acquire it.
当一个锁当前正在使用,而另一个线程试图获取它,那么就会出现锁争用。
For example, a lock snapshot captures and returns database lock information.
例如,锁快照捕获并返回数据库锁信息。
An example might be at the customer level in a financial system: one coarse grained lock could be to lock all accounts for the customer, another could be to lock all insurance policies.
例如,在财务系统中的客户级别上:一个粗粒度锁会锁定该客户的所有帐户,另一个锁则可锁定全部保险策略。
This is because the new X row lock and the is table lock are not compatible.
这是因为新的x行锁定和is表锁定是不兼容的。
Lock contention occurs when a lock is currently in use and another thread attempts to acquire it by another thread.
如果一个锁正在使用中,而另一个线程尝试获取它,这时会发生锁争用。
When two threads contend for a lock, one of them will get the lock and the other will have to block until the lock is available.
当两个线程竞争同一个锁时,其中一个会得到锁,另一个不得不阻塞,直到锁可用。
When a thread a tries to acquire a JUC lock, while this lock has been acquired by another thread, then thread a has to "stop" its execution and wait until this lock is released or times out.
当线程a试图去获得一个JUC锁,但这个锁却已经被另外一个线程获得,那么线程A不得不“停止”,直到这个锁被释放或者超时。
The idea behind priority inheritance is that at the point of lock contention, the lock holder's priority is boosted to that of the thread wishing to acquire the lock.
优先级继承背后的思想是锁争用,锁持有者的优先级被提高到希望获取锁的线程的优先级。
After some small number of row locks are obtained, a lock escalation to a table lock will occur automatically.
当获得少量的行锁时,行锁就会自动地逐渐升级为表锁。
When an attempt to update is made, the lock will be promoted to an update lock.
当尝试获取更新锁定时,该锁定将变为更新锁定。
Application 2 can establish an IX lock on the table and an X row lock, because the table lock IX is compatible to the IN table lock from A1.
应用程序2可以在表上建立一个IX锁定和一个x行锁定,因为表锁定ix兼容a1的in表锁定。
Lock - Number of locks held, deadlocks and lock waits escalations.
LOCK——保存的锁、死锁和锁等待升级的数目。
The application that experienced the lock timeout is described in the section Lock Requestor.
发生锁定超时的应用程序在 Lock Requestor部分中描述。
Because the acquired lock does not persist across transaction boundaries, the import utility loses its IX table lock and must request another lock after each commit.
因为获得的锁不会跨事务边界存在,所以import工具将失去它的IX表锁,并且必须在每次提交之后请求另一个锁。
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相同的并发性和内存语义,但是添加了类似锁投票、定时锁等候和可中断锁等候的一些特性。
Using a separate file to indicate a lock is an example of an advisory lock, not a mandatory lock.
使用单独的文件来表示锁,是“劝告式(advisory)”锁而不是“强制(mandatory)”锁的一个例子。
应用推荐