Skip to navigation

holoscan::CancellationView

Beta
View as Markdown

Observe cooperative stop or fatal shutdown during one callback.

The view is borrowed, non-owning, read-only, nonblocking, and allocation-free. It is valid only for the callback lifetime. Once a read returns true, the callback’s monotonic latch never returns false. Reading grants no stop, wait, rollback, or publication authority.

#include <holoscan/lifecycle.hpp>

Constructors

CancellationView

holoscan::CancellationView::CancellationView() noexcept = default

Construct an inert view that reports no stop request.


Methods

stop_requested

bool holoscan::CancellationView::stop_requested() const noexcept

Return whether cooperative stop or fatal shutdown was requested.

Returns: The monotonic callback-scoped latch using acquire ordering, or false for an inert view.


Member variables

NameTypeDescription
requested_const std::atomic_bool *