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

◆ register_clock()

void MayaFlux::Vruta::TaskScheduler::register_clock ( ProcessingToken  token,
std::shared_ptr< IClock clock 
)

Register an externally-owned clock as the authoritative source for a token domain.

Replaces any clock ensure_domain created for this token. The caller retains shared ownership; the scheduler reads position and rate from it but does not tick it. Intended for subsystems that self-drive their own clock (e.g. GraphicsSubsystem and its FrameClock).

Parameters
tokenProcessing domain whose clock is being replaced.
clockExternally-owned clock instance.

Definition at line 259 of file Scheduler.cpp.

260{
261 ensure_domain(token);
262 m_token_clocks[token] = std::move(clock);
263}
std::unordered_map< ProcessingToken, std::shared_ptr< IClock > > m_token_clocks
Clock instances for each processing domain.
void ensure_domain(ProcessingToken token, unsigned int rate=0)
Initialize a processing domain if it doesn't exist.

References ensure_domain(), and m_token_clocks.

+ Here is the call graph for this function: