Kyoto Cabinet
Public Member Functions
kyotocabinet::SpinLock Class Reference

Lightweight mutual exclusion device. More...

#include <kcthread.h>

List of all members.

Public Member Functions

 SpinLock ()
 Default constructor.
 ~SpinLock ()
 Destructor.
void lock ()
 Get the lock.
bool lock_try ()
 Try to get the lock.
void unlock ()
 Release the lock.

Detailed Description

Lightweight mutual exclusion device.


Constructor & Destructor Documentation

Default constructor.

Destructor.


Member Function Documentation

Get the lock.

Try to get the lock.

Returns:
true on success, or false on failure.

Release the lock.