Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
gts::MicroSchedulerLambda_Workload Class Reference

A concrete lambda Workload that maps to the MicroScheduler. More...

#include <MicroScheduler_Workload.h>

Inherits gts::MicroScheduler_Workload.

Public Member Functions

template<typename TFunc , typename... TArgs>
GTS_INLINE MicroSchedulerLambda_Workload (TFunc &&func, TArgs &&... args)
 
virtual GTS_INLINE void execute (WorkloadContext const &ctx) final
 
- Public Member Functions inherited from gts::MicroScheduler_Workload
GTS_INLINE uint32_t workerAffinityId () const
 
GTS_INLINE void setWorkerAffinityId (uint32_t workerId)
 
- Public Member Functions inherited from gts::Workload
GTS_INLINE Workload (WorkloadType::Enum type)
 
virtual ~Workload ()=default
 
GTS_INLINE WorkloadType::Enum type () const
 
GTS_INLINE NodemyNode () const
 

Additional Inherited Members

- Protected Attributes inherited from gts::MicroScheduler_Workload
TaskContext m_executionContext
 
uint32_t m_workerId
 
- Protected Attributes inherited from gts::Workload
Nodem_pMyNode
 The Node this Workload is attached to.
 
WorkloadType::Enum m_type
 The Workloads type.
 

Detailed Description

A concrete lambda Workload that maps to the MicroScheduler.

Member Function Documentation

◆ execute()

virtual GTS_INLINE void gts::MicroSchedulerLambda_Workload::execute ( WorkloadContext const &  ctx)
inlinefinalvirtual

Executes the Workload in the given context.

Implements gts::Workload.