Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::tasks::TaskSchedulerOptions Struct Reference

Options for a TaskScheduler. More...

#include "donner/base/tasks/TaskScheduler.h"

Public Attributes

std::size_t workerCount = DefaultWorkerCount()
 Workers to start in ordinary mode. Without a seed, zero runs every spawn inline.
std::size_t dequeCapacity = 4096
 Entries per worker or adopted deque; a power of two.
std::size_t maxTasksPerCreator = 4096
 Live task records per worker or adopted slot.
std::size_t maxExternalTasks = 64 * 1024
 Shared record bound for submitters that are neither workers nor adopted by this scheduler.
std::size_t idleSpinRounds = 1
 Steal rounds an idle worker makes before it tries to sleep.
std::size_t workerStackBytes = 512 * 1024
 Each worker's stack, rounded up to whole pages. At least the platform's minimum thread stack and twice kStackReserveBytes.
std::size_t retainedCoroutineFrameBytes = 64 * 1024
 Bytes of freed coroutine-frame allocations to retain. 0 disables reuse.
std::size_t helpMarginBytes = 128 * 1024
 Stack a worker waiting on a scope keeps free: it helps with other work only while it has more than this left. A heuristic that decides which worker helps, not a bound on depth.
std::optional< std::uint64_t > seed = std::nullopt
 Run tasks of each joined scope in reproducible order on the constructing thread, without workers.
WorkerQos workerQos = WorkerQos::kInteractive
 Requested class of each Apple worker, independent of its creator.
std::size_t adoptableThreads = 1
 Number of reserved non-worker deques. Zero disables thread adoption.

Detailed Description

Options for a TaskScheduler.

Member Data Documentation

◆ adoptableThreads

std::size_t donner::tasks::TaskSchedulerOptions::adoptableThreads = 1

Number of reserved non-worker deques. Zero disables thread adoption.

◆ dequeCapacity

std::size_t donner::tasks::TaskSchedulerOptions::dequeCapacity = 4096

Entries per worker or adopted deque; a power of two.

◆ helpMarginBytes

std::size_t donner::tasks::TaskSchedulerOptions::helpMarginBytes = 128 * 1024

Stack a worker waiting on a scope keeps free: it helps with other work only while it has more than this left. A heuristic that decides which worker helps, not a bound on depth.

◆ idleSpinRounds

std::size_t donner::tasks::TaskSchedulerOptions::idleSpinRounds = 1

Steal rounds an idle worker makes before it tries to sleep.

◆ maxExternalTasks

std::size_t donner::tasks::TaskSchedulerOptions::maxExternalTasks = 64 * 1024

Shared record bound for submitters that are neither workers nor adopted by this scheduler.

◆ maxTasksPerCreator

std::size_t donner::tasks::TaskSchedulerOptions::maxTasksPerCreator = 4096

Live task records per worker or adopted slot.

◆ retainedCoroutineFrameBytes

std::size_t donner::tasks::TaskSchedulerOptions::retainedCoroutineFrameBytes = 64 * 1024

Bytes of freed coroutine-frame allocations to retain. 0 disables reuse.

◆ seed

std::optional<std::uint64_t> donner::tasks::TaskSchedulerOptions::seed = std::nullopt

Run tasks of each joined scope in reproducible order on the constructing thread, without workers.

◆ workerCount

std::size_t donner::tasks::TaskSchedulerOptions::workerCount = DefaultWorkerCount()

Workers to start in ordinary mode. Without a seed, zero runs every spawn inline.

◆ workerQos

WorkerQos donner::tasks::TaskSchedulerOptions::workerQos = WorkerQos::kInteractive

Requested class of each Apple worker, independent of its creator.

◆ workerStackBytes

std::size_t donner::tasks::TaskSchedulerOptions::workerStackBytes = 512 * 1024

Each worker's stack, rounded up to whole pages. At least the platform's minimum thread stack and twice kStackReserveBytes.


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