示例#1
0
Lock::GlobalLock::GlobalLock(OperationContext* opCtx,
                             LockMode lockMode,
                             Date_t deadline,
                             InterruptBehavior behavior)
    : GlobalLock(opCtx, lockMode, deadline, behavior, EnqueueOnly()) {
    waitForLockUntil(deadline);
}
示例#2
0
Lock::GlobalLock::GlobalLock(Locker* locker, LockMode lockMode, unsigned timeoutMs)
    : GlobalLock(locker, lockMode, EnqueueOnly()) {
    waitForLock(timeoutMs);
}
ReplicationStateTransitionLockGuard::ReplicationStateTransitionLockGuard(OperationContext* opCtx)
    : ReplicationStateTransitionLockGuard(opCtx, EnqueueOnly()) {
    waitForLockUntil(Date_t::max());
}