third-party/tbb/src/doc/html/a00149.html
Public Member Functions | List of all members
tbb::queuing_rw_mutex::scoped_lock Class Reference
The scoped locking pattern. More...
#include <queuing_rw_mutex.h>
Inheritance diagram for tbb::queuing_rw_mutex::scoped_lock:
|
|
| | scoped_lock () |
| | Construct lock that has not acquired a mutex. More...
|
| |
| | scoped_lock (queuing_rw_mutex &m, bool write=true) |
| | Acquire lock on given mutex.
|
| |
| | ~scoped_lock () |
| | Release lock (if lock is held).
|
| |
| void | acquire (queuing_rw_mutex &m, bool write=true) |
| | Acquire lock on given mutex.
|
| |
| bool | try_acquire (queuing_rw_mutex &m, bool write=true) |
| | Acquire lock on given mutex if free (i.e. non-blocking)
|
| |
| void | release () |
| | Release lock.
|
| |
| bool | upgrade_to_writer () |
| | Upgrade reader to become a writer. More...
|
| |
| bool | downgrade_to_reader () |
| | Downgrade writer to become a reader.
|
| |
The scoped locking pattern.
It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks.
|
| tbb::queuing_rw_mutex::scoped_lock::scoped_lock | ( | | ) | |
| inline |
Construct lock that has not acquired a mutex.
Equivalent to zero-initialization of *this.
| bool tbb::queuing_rw_mutex::scoped_lock::upgrade_to_writer | ( | | ) | |
Upgrade reader to become a writer.
Returns whether the upgrade happened without releasing and re-acquiring the lock
The documentation for this class was generated from the following file:
Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
* Other names and brands may be claimed as the property of others.