MayaFlux 1.0.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 once, on the thread that stops the chain, regardless of how it stops:

  • After final event completes normally
  • After cancel() is called
  • When a later start() under the same name replaces the chain
  • When the scheduler terminates all tasks

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 163 of file Chain.cpp.

164{
165 m_on_complete = std::move(callback);
166 return *this;
167}
PickCallback callback
Definition Picker.cpp:22
std::function< void()> m_on_complete
Optional callback to execute when the chain completes.
Definition Chain.hpp:215

References callback, and m_on_complete.