MayaFlux 0.4.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 448 of file Routine.cpp.

449{
450 MF_PRINT("CrossRoutine next_execution called. is_active: {}, next_sample: {}, next_frame: {}",
451 is_active(),
452 is_active() ? m_handle.promise().next_sample.load(std::memory_order_acquire) : UINT64_MAX,
453 is_active() ? m_handle.promise().next_frame.load(std::memory_order_acquire) : UINT64_MAX);
454
455 return is_active()
456 ? m_handle.promise().next_sample.load(std::memory_order_acquire)
457 : UINT64_MAX;
458}
#define MF_PRINT(...)
std::coroutine_handle< promise_type > m_handle
Definition Routine.hpp:726
bool is_active() const override
Checks if the coroutine is still active.
Definition Routine.cpp:428

References is_active(), m_handle, and MF_PRINT.

+ Here is the call graph for this function: