Kyoto Cabinet

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

kyotocabinet::RWLock::RWLock | ( |  | ) | `[explicit]`

Default constructor.

kyotocabinet::RWLock::~RWLock | ( |  | ) |

Destructor.

## Member Function Documentation

void kyotocabinet::RWLock::lock_writer | ( |  | ) |

Get the writer lock.

bool kyotocabinet::RWLock::lock_writer_try | ( |  | ) |

Try to get the writer lock.

Returns:
  true on success, or false on failure.

void kyotocabinet::RWLock::lock_reader | ( |  | ) |

Get a reader lock.

bool kyotocabinet::RWLock::lock_reader_try | ( |  | ) |

Try to get a reader lock.

Returns:
  true on success, or false on failure.

void kyotocabinet::RWLock::unlock | ( |  | ) |

Release the lock.