Click
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rXwlockPR Class Reference

#include <multithread.hh>

Public Member Functions

 rXwlockPR (int32_t max_writers)
 
void set_max_writers (int32_t max_writers)
 
void read_begin ()
 
void read_end ()
 
void read_get ()
 
void write_begin ()
 
void write_end ()
 

Detailed Description

Read XOR Write lock, "prefer read" variant

Allow either multiple reader or multiple writer. When a reader arrives, writers stop taking the usecount. The reader has access once all writer finish.

To stop writer from locking, the reader will CAS a very low value.

If max_writer is 1, this becomes rwlock, but with a priority on the reads


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