Move-only worker-safe capacity observation; destruction unregisters without waiting.
More...
#include <source_budget.hpp>
Move-only worker-safe capacity observation; destruction unregisters without waiting.
◆ SourceCapacityObserver()
| portals::SourceCapacityObserver::SourceCapacityObserver |
( |
SourceCapacityObserver && | other | ) |
|
|
noexcept |
- Parameters
-
| other | Registration to transfer and leave empty. |
◆ arm()
- Parameters
-
| peak | Complete next-turn demand. |
- Returns
- Armed one-shot notification or a typed permanent limit. Capacity is rechecked atomically; a release before arming cannot be lost.
◆ operator=()
- Parameters
-
| other | Registration replacing this one. |
- Returns
- This observer after unregistering the old one.
◆ reserve()
- Parameters
-
| amount | Actual reservation. |
| peak | Complete simultaneous demand, including amount. |
- Returns
- Charged credit after an atomic peak check, WOULD_BLOCK, or PAGE_TOO_LARGE for impossible demand.
◆ takeReady()
| bool portals::SourceCapacityObserver::takeReady |
( |
| ) |
|
|
noexcept |
- Returns
- Whether an armed notification granted admission priority, consuming only its ready flag.
The documentation for this class was generated from the following file: