|
FOSSredder 0.5.0
|
Limits concurrent access to a bounded number of slots. More...
#include <Scheduler.h>
Public Member Functions | |
| SlotLimiter (std::size_t slots) | |
| Create a limiter with at least one available slot. | |
| void | acquire () |
| Block until a slot is available and acquire it. | |
| void | release () |
| Release one acquired slot and wake a waiting caller. | |
Limits concurrent access to a bounded number of slots.
Definition at line 27 of file Scheduler.h.
|
explicit |
Create a limiter with at least one available slot.
| slots | Maximum number of concurrent acquisitions. |
Definition at line 21 of file Scheduler.cpp.
| void core::jobs::SlotLimiter::acquire | ( | ) |
Block until a slot is available and acquire it.
Definition at line 27 of file Scheduler.cpp.
| void core::jobs::SlotLimiter::release | ( | ) |
Release one acquired slot and wake a waiting caller.
Definition at line 34 of file Scheduler.cpp.