MayaFlux 0.4.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 194 of file Chain.cpp.

195{
196 m_on_complete = std::move(callback);
197 return *this;
198}
std::function< void()> m_on_complete
Optional callback to execute when the chain completes.
Definition Chain.hpp:214

References m_on_complete.