Callisto Engine
round_robin.h
1#pragma once
2
3#include "scheduler.h"
4
5namespace cl::threading {
6 class async_worker;
7
13 class round_robin : public scheduler {
14 private:
15 async_worker* all_workers{nullptr};
16 size_t current{0};
17 size_t count{0};
18
19 public:
20 api_status init(async_worker* workers, size_t worker_count) override;
21 api_status next(async_worker** worker) override;
22 };
23}
Definition: async_worker.h:7
Round robin implementation of async worker scheduler.
Definition: round_robin.h:13
api_status next(async_worker **worker) override
Grabs the next suitable scheduler, according to the algorithm being used.
Definition: round_robin.cpp:15
Thread pool scheduler interface.
Definition: scheduler.h:13