|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
Cancellation-aware counting semaphore for nested-action concurrency. More...
#include <cpp/a11/actions/action.h>
Public Member Functions | |
| absl::Status | Acquire () |
| Acquires a slot, blocking until one is free or cancelled. | |
| void | Release () |
| Releases a previously acquired slot. | |
Static Public Member Functions | |
| static absl::StatusOr< std::shared_ptr< ActionLimiter > > | Create (size_t maximum) |
Creates a limiter admitting at most maximum holders. | |
Cancellation-aware counting semaphore for nested-action concurrency.
Bounds how many nested actions a root (or its descendants) may run at once; Acquire blocks until a slot is free and unblocks if the owning action is cancelled.
| absl::Status a11::actions::ActionLimiter::Acquire | ( | ) |
Acquires a slot, blocking until one is free or cancelled.
|
static |
Creates a limiter admitting at most maximum holders.
| void a11::actions::ActionLimiter::Release | ( | ) |
Releases a previously acquired slot.