Storage Engine API
mongo::UninterruptibleLockGuard Class Reference

This class prevents lock acquisitions from being interrupted when it is in scope. More...

#include <locker.h>

Detailed Description

This class prevents lock acquisitions from being interrupted when it is in scope.

The default behavior of acquisitions depends on the type of lock that is being requested. Use this in the unlikely case that waiting for a lock can't be interrupted.

Lock acquisitions can still return LOCK_TIMEOUT, just not if the parent operation context is killed first.

It is possible that multiple callers are requesting uninterruptible behavior, so the guard increments a counter on the Locker class to indicate how may guards are active.

Public Member Functions

 UninterruptibleLockGuard (Locker *locker)
 
 ~UninterruptibleLockGuard ()
 

Private Attributes

Locker *const _locker
 

Constructor & Destructor Documentation

◆ UninterruptibleLockGuard()

mongo::UninterruptibleLockGuard::UninterruptibleLockGuard ( Locker locker)
inlineexplicit

◆ ~UninterruptibleLockGuard()

mongo::UninterruptibleLockGuard::~UninterruptibleLockGuard ( )
inline

Member Data Documentation

◆ _locker

Locker* const mongo::UninterruptibleLockGuard::_locker
private

The documentation for this class was generated from the following file: