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

◆ next_execution()

uint64_t MayaFlux::Vruta::CrossRoutine::next_execution ( ) const
overridevirtual

Gets the sample position when this routine should next execute.

Returns
Sample position for next execution, or uint64_MAX if inactive

This method is crucial for sample-accurate scheduling. It returns the exact sample position when the coroutine should be resumed next. The scheduler uses this to determine when to call try_resume().

Implements MayaFlux::Vruta::Routine.

Definition at line 461 of file Routine.cpp.

462{
463 MF_PRINT("CrossRoutine next_execution called. is_active: {}, next_sample: {}, next_frame: {}",
464 is_active(),
465 is_active() ? m_handle.promise().next_sample.load(std::memory_order_acquire) : UINT64_MAX,
466 is_active() ? m_handle.promise().next_frame.load(std::memory_order_acquire) : UINT64_MAX);
467
468 return is_active()
469 ? m_handle.promise().next_sample.load(std::memory_order_acquire)
470 : UINT64_MAX;
471}
#define MF_PRINT(...)
std::coroutine_handle< promise_type > m_handle
Definition Routine.hpp:752
bool is_active() const override
Checks if the coroutine is still active.
Definition Routine.cpp:441

References is_active(), m_handle, and MF_PRINT.

+ Here is the call graph for this function: