Tkrzw
Public Member Functions | List of all members
tkrzw::ScopedSlottedLock Class Referencefinal

Scoped lock with a slotted shared mutex. More...

#include <tkrzw_thread_util.h>

Public Member Functions

 ScopedSlottedLock (SlottedMutex &mutex, int32_t index, bool writable)
 Constructor. More...
 
 ~ScopedSlottedLock ()
 Destructor. More...
 

Detailed Description

Scoped lock with a slotted shared mutex.

Constructor & Destructor Documentation

◆ ScopedSlottedLock()

tkrzw::ScopedSlottedLock::ScopedSlottedLock ( SlottedMutex mutex,
int32_t  index,
bool  writable 
)

Constructor.

Parameters
mutexA slotted shared mutex.
indexThe index of a slot. Negative means all slots.
writableTrue for exclusive lock. False for shared lock.

◆ ~ScopedSlottedLock()

tkrzw::ScopedSlottedLock::~ScopedSlottedLock ( )

Destructor.