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

◆ on_complete()

void MayaFlux::Vruta::SoundRoutine::on_complete ( std::function< void()>  callback)
inlineoverridevirtual

Register a callback invoked once at final suspend or a termination request, whichever occurs first.

A termination request may invoke it while is_active() still returns true. It runs on the thread that reaches final suspend or requests termination. Register before scheduling; replacing a callback while the routine is live is unsupported and racy. A callback first registered after either event runs immediately on the caller's thread.

Parameters
callbackFunction to invoke on completion

Implements MayaFlux::Vruta::Routine.

Definition at line 423 of file Routine.hpp.

424 {
425 m_handle.promise().on_complete(std::move(callback));
426 }
PickCallback callback
Definition Picker.cpp:22
std::coroutine_handle< promise_type > m_handle
Handle to the underlying coroutine.
Definition Routine.hpp:468

References callback.