A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
Loading...
Searching...
No Matches
a11::actions::ActionLimiter Class Referenceabstract

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.
 

Detailed Description

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.

Member Function Documentation

◆ Acquire()

absl::Status a11::actions::ActionLimiter::Acquire ( )

Acquires a slot, blocking until one is free or cancelled.

◆ Create()

absl::StatusOr< std::shared_ptr< ActionLimiter > > a11::actions::ActionLimiter::Create ( size_t  maximum)
static

Creates a limiter admitting at most maximum holders.

◆ Release()

void a11::actions::ActionLimiter::Release ( )

Releases a previously acquired slot.


The documentation for this class was generated from the following files: