| Home | Download | Screen shots | Discussion | Documentation |
|---|
#include <openvrml/read_write_mutex.h>

Public Member Functions | |
| scoped_read_write_lock (read_write_mutex &mutex) | |
| Construct. | |
| ~scoped_read_write_lock () | |
| Destroy. | |
| void | promote () |
| Promote the lock to a write lock. | |
| void | demote () |
| Demote the lock from a write lock back to a read lock. | |
Upon construction, the associated mutex is locked for reading. The lock can be “promoted” to a write lock by calling promote.
| openvrml::read_write_mutex::scoped_read_write_lock::scoped_read_write_lock | ( | read_write_mutex & | mutex | ) | [explicit] |
| openvrml::read_write_mutex::scoped_read_write_lock::~scoped_read_write_lock | ( | ) |
Destroy.
| void openvrml::read_write_mutex::scoped_read_write_lock::promote | ( | ) |
Promote the lock to a write lock.
| void openvrml::read_write_mutex::scoped_read_write_lock::demote | ( | ) |
Demote the lock from a write lock back to a read lock.
If the lock has not been promoted previously, this function has no effect.