Struct global_executor

Struct Documentation

struct concore::v1::global_executor

The default global executor type.

This is an executor that passes the tasks directly to concore’s task system. Whenever there is a core available, the task is executed.

The executor takes as constructor parameter the priority of the task to be used when enqueueing the task.

Two executor objects are equivalent if their priorities match.

See

inline_executor, spawn_executor

Public Types

using priority = detail::task_priority

The priority of the task to be used.

Public Functions

global_executor(priority prio = prio_normal)

Constructor.

template<typename F>
void execute(F &&f) const

Method called to execute work in the global executor.

void execute(task t) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Public Static Attributes

constexpr auto prio_critical = detail::task_priority::critical

Critical-priority tasks.

constexpr auto prio_high = detail::task_priority::high

High-priority tasks.

constexpr auto prio_normal = detail::task_priority::normal

Tasks with normal priority.

constexpr auto prio_low = detail::task_priority::low

Tasks with low priority.

constexpr auto prio_background = detail::task_priority::background

Tasks with lowest possible priority.

Friends

friend bool operator==(global_executor l, global_executor r)

Equality operator.

friend bool operator!=(global_executor l, global_executor r)

Inequality operator.