MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ on_complete()

EventChain & MayaFlux::Kriya::EventChain::on_complete ( std::function< void()>  callback)

Sets a callback to execute when the chain stops executing.

Parameters
callbackFunction to call after chain completes or is cancelled

The callback fires regardless of how the chain stops:

  • After final event completes normally
  • After cancel() is called
  • After an exception in an action (action exceptions are caught)

Use this for cleanup that must happen regardless of completion reason. For actions that should only run on successful completion, use .then()

Definition at line 136 of file Chain.cpp.

137{
138 m_on_complete = std::move(callback);
139 return *this;
140}
std::function< void()> m_on_complete
Optional callback to execute when the chain completes.
Definition Chain.hpp:202

References m_on_complete.