Storage Engine API
mongo::Lock::SharedLock Class Reference

Obtains a ResourceMutex for shared/non-exclusive use. More...

#include <d_concurrency.h>

Inheritance diagram for mongo::Lock::SharedLock:
mongo::Lock::ResourceLock

Detailed Description

Obtains a ResourceMutex for shared/non-exclusive use.

This uses MODE_IS rather than MODE_S to take advantage of optimizations in the lock manager for intent modes. This is OK as this just has to conflict with exclusive locks.

Public Member Functions

 SharedLock (Locker *locker, ResourceMutex mutex)
 
- Public Member Functions inherited from mongo::Lock::ResourceLock
 ResourceLock (Locker *locker, ResourceId rid)
 
 ResourceLock (Locker *locker, ResourceId rid, LockMode mode)
 
 ResourceLock (ResourceLock &&otherLock)
 
 ~ResourceLock ()
 
void lock (LockMode mode)
 
void unlock ()
 
bool isLocked () const
 

Constructor & Destructor Documentation

◆ SharedLock()

mongo::Lock::SharedLock::SharedLock ( Locker locker,
ResourceMutex  mutex 
)
inline

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