Callisto Engine
cl::threading::scheduler Class Referenceabstract

Thread pool scheduler interface. More...

#include <scheduler.h>

Inheritance diagram for cl::threading::scheduler:

Public Member Functions

virtual api_status init (async_worker workers[], size_t worker_count)=0
 Initializes the scheduler. More...
 
virtual api_status next (async_worker **worker)=0
 Grabs the next suitable scheduler, according to the algorithm being used. More...
 

Detailed Description

Thread pool scheduler interface.

This is the main interface for creating schedulers for the engine task pool

Member Function Documentation

◆ init()

virtual api_status cl::threading::scheduler::init ( async_worker  workers[],
size_t  worker_count 
)
pure virtual

Initializes the scheduler.

Parameters
workersThe workers that are available to the scheduler
worker_countThe amount of workers in the array
Returns
api_status::ok when initialized, otherwise api_status::scheduler_not_initialized

◆ next()

virtual api_status cl::threading::scheduler::next ( async_worker **  worker)
pure virtual

Grabs the next suitable scheduler, according to the algorithm being used.

Parameters
workera pointer to an async_worker pointer that will contain the result.
Returns
api_status::ok on success, or implementation-dependent errors.

Implemented in cl::threading::round_robin.


The documentation for this class was generated from the following file: