xronos-sdk 0.6.0
Xronos C++ SDK
Loading...
Searching...
No Matches
xronos::sdk::BaseReaction::ShutdownEffect Class Reference

Allows a reaction to terminate the program. More...

#include <xronos/sdk/reaction.hh>

Public Member Functions

 ShutdownEffect (Shutdown &shutdown, const ReactionContext &context)
 Constructor.
void trigger_shutdown () noexcept
 Terminate the currently running reactor program.

Detailed Description

Allows a reaction to terminate the program.

Constructor & Destructor Documentation

◆ ShutdownEffect()

xronos::sdk::BaseReaction::ShutdownEffect::ShutdownEffect ( Shutdown & shutdown,
const ReactionContext & context )

Constructor.

Parameters
shutdownThe shutdown event source used to trigger termination of the program.
contextThe context of the reaction the effect is declared for. Can be obtained using context().

Member Function Documentation

◆ trigger_shutdown()

void xronos::sdk::BaseReaction::ShutdownEffect::trigger_shutdown ( )
noexcept

Terminate the currently running reactor program.

Terminates a running program at the next convenience. After completing all currently active reactions, this triggers the Shutdown event sources. Once all reactions triggered by Shutdown are processed, the program terminates.


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