Kyoto Cabinet
Public Member Functions
kyotocabinet::RWLock Class Reference

Reader-writer locking device. More...

#include <kcthread.h>

List of all members.

Public Member Functions

 RWLock ()
 Default constructor.
 ~RWLock ()
 Destructor.
void lock_writer ()
 Get the writer lock.
bool lock_writer_try ()
 Try to get the writer lock.
void lock_reader ()
 Get a reader lock.
bool lock_reader_try ()
 Try to get a reader lock.
void unlock ()
 Release the lock.

Detailed Description

Reader-writer locking device.


Constructor & Destructor Documentation

Default constructor.

Destructor.


Member Function Documentation

Get the writer lock.

Try to get the writer lock.

Returns:
true on success, or false on failure.

Get a reader lock.

Try to get a reader lock.

Returns:
true on success, or false on failure.

Release the lock.