This only succeeds if another thread does not already have the lock, in which case the current thread is blocked.
只有在其他线程不拥有锁的情况下才会成功,如果其他线程拥有锁,当前线程就被阻塞。
Another special case of locking is the need to lock something where currently no database row exists.
锁定的另一个特例是需要锁定当前数据库行中不存在的项目。
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.
在本方案中,通过逻辑锁(而不是物理锁)来对在较长时间中使用的数据行进行标记。
应用推荐