The task scheduler: worker threads, their deques, the global queue for threads that are not workers, and the sleep and publish protocol that keeps queued work from waiting on a sleeping pool. More...
#include <atomic>#include <cstddef>#include <cstdint>#include <memory>#include <mutex>#include <optional>#include <ostream>#include <utility>#include <vector>#include "donner/base/Utils.h"#include "donner/base/tasks/CoroutineFramePool.h"#include "donner/base/tasks/FalseSharing.h"#include "donner/base/tasks/Parker.h"#include "donner/base/tasks/ParkerPool.h"#include "donner/base/tasks/SchedulerWork.h"#include "donner/base/tasks/ScopeStop.h"#include "donner/base/tasks/TaskRecord.h"#include "donner/base/tasks/WorkStealingDeque.h"#include "donner/base/tasks/WorkerPolicy.h"#include "donner/base/tasks/WorkerStack.h"Classes | |
| struct | donner::tasks::TaskSchedulerOptions |
| Options for a TaskScheduler. More... | |
| class | donner::tasks::SchedulerTestHooks |
| Test seam: called at each SchedulerStep with the index of the worker the step concerns. More... | |
| class | donner::tasks::AdoptedThread |
| A thread-affine claim on one scheduler slot. Destroy it after its synchronous scopes. More... | |
| class | donner::tasks::TaskScheduler |
| A work-stealing task scheduler. More... | |
| struct | donner::tasks::detail::ParallelForAccess |
| Internal access to the optional loop instrumentation. More... | |
| class | donner::tasks::ScheduleAwaitable |
| Stores its queue entry in the suspended caller's frame. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Enumerations | |
| enum class | donner::tasks::WorkerState : std::uint8_t { Awake , AsleepShallow , AsleepDeep , AwakeReserved } |
| A worker's state word. More... | |
| enum class | donner::tasks::SchedulerStep : std::uint8_t { AfterDrain , AfterWaitingBit , AfterSleeperDecrement , BeforeSleeperWaits , BeforeSelfWakeSwap , BeforeHandOff , AfterPublishPush , BetweenWakeSwapAndParkerChange , AfterStopFlagSet , ScopeWaiterBeforePrepareWait , ScopeWaiterBeforeWait , ResumptionPublished , AsyncJoinBeforeRegister , AsyncJoinRegistered , AsyncJoinFinisherAfterDecrement , AsyncJoinBeforeEnqueue , ScopeFinisherAfterDecrement , ParallelForBeforeClaim , ParallelForAfterClaim , AfterSearchStart , WorkerBeforeStartupBarrier , BeforeSearchStart , AfterEmptySearch , AfterAdoptedPush , BeforeAdoptedStealClaim } |
| A point in the sleep, publish and shutdown protocols where a test can hold or delay a thread. More... | |
Functions | |
| constexpr bool | donner::tasks::IsWorkerAwake (WorkerState state) |
| Whether a worker in this state counts toward the scheduler's awake total. | |
| std::ostream & | donner::tasks::operator<< (std::ostream &os, WorkerState state) |
| Ostream output operator for WorkerState, for test diagnostics. | |
| std::ostream & | donner::tasks::operator<< (std::ostream &os, SchedulerStep step) |
| Ostream output operator for SchedulerStep, for test diagnostics. | |
The task scheduler: worker threads, their deques, the global queue for threads that are not workers, and the sleep and publish protocol that keeps queued work from waiting on a sleeping pool.
|
strong |
A point in the sleep, publish and shutdown protocols where a test can hold or delay a thread.
|
strong |