A synchronization aid that blocks until a counter reaches zero.
More...
#include <latch.h>
|
| | latch (std::ptrdiff_t count) |
| | Creates a latch with an initial counter value.
|
| |
| void | count_down (std::ptrdiff_t n=1) |
| | Decrements the counter and wakes waiters when it reaches zero.
|
| |
| void | wait () const |
| | Blocks until the internal counter reaches zero.
|
| |
A synchronization aid that blocks until a counter reaches zero.
Definition at line 9 of file latch.h.
◆ latch()
| roo::latch::latch |
( |
std::ptrdiff_t |
count | ) |
|
|
inlineexplicit |
Creates a latch with an initial counter value.
- Parameters
-
| count | initial counter value. |
Definition at line 13 of file latch.h.
◆ count_down()
| void roo::latch::count_down |
( |
std::ptrdiff_t |
n = 1 | ) |
|
|
inline |
Decrements the counter and wakes waiters when it reaches zero.
- Parameters
-
Definition at line 17 of file latch.h.
◆ wait()
| void roo::latch::wait |
( |
| ) |
const |
|
inline |
Blocks until the internal counter reaches zero.
Definition at line 25 of file latch.h.
The documentation for this class was generated from the following file:
- temp_repos/roo_threads/src/roo_threads/latch.h