concurrency namespace

Classes

struct Job
Job descriptor to be run by the workers.
class Scheduler
template<typename T, typename Lock = std::mutex>
class StealingQueue
class Worker

Enums

enum class RunningState { Stopped, Running, PauseRequested, Paused, Waiting }
The states of the worker.

Typedefs

using default_function_type = std::function<void()>
default function type "function<void()>" will be used if dont provided

Variables

template<typename T = default_function_type>
concept InvocableJob
template<typename Lock>
concept is_lockable
Simple concept for the Lockable and Basic Lockable types as defined by the C++ standard.

Enum documentation

enum class concurrency::RunningState

The states of the worker.

Enumerators
Stopped

it is doing nothing

Running

it is running

PauseRequested

pause is requested

Paused

it is paused

Waiting

it is waiting for time or resource. Mostly for non blocking jobs and swappable contexts. Coroutines(?).

Typedef documentation

using concurrency::default_function_type = std::function<void()>

default function type "function<void()>" will be used if dont provided

Variable documentation

template<typename T = default_function_type>
concept concurrency::InvocableJob

template<typename Lock>
concept concurrency::is_lockable

Simple concept for the Lockable and Basic Lockable types as defined by the C++ standard.

See https://en.cppreference.com/w/cpp/named_req/Lockable and https://en.cppreference.com/w/cpp/named_req/BasicLockable for details.