Apache Mesos
Classes | Public Member Functions | List of all members
process::ReadWriteLock Class Reference

ReadWriteLock is a lock that allows concurrent reads and exclusive writes. More...

#include <rwlock.hpp>

Public Member Functions

 ReadWriteLock ()
 
Future< Nothingwrite_lock ()
 
void write_unlock ()
 
Future< Nothingread_lock ()
 
void read_unlock ()
 

Detailed Description

ReadWriteLock is a lock that allows concurrent reads and exclusive writes.

To prevent starvation of write lock requests, reads will queue when one or more write lock requests is waiting, even if the read lock is currently acquired.

Constructor & Destructor Documentation

process::ReadWriteLock::ReadWriteLock ( )
inline

Member Function Documentation

Future<Nothing> process::ReadWriteLock::read_lock ( )
inline
void process::ReadWriteLock::read_unlock ( )
inline
Future<Nothing> process::ReadWriteLock::write_lock ( )
inline
void process::ReadWriteLock::write_unlock ( )
inline

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