Lines Matching refs:Scheduler
1 # `marl::Scheduler`
5 - [`marl::Scheduler`](#marlscheduler)
10 - [`marl::Scheduler::Worker::run()`](#marlschedulerworkerrun)
11 - [`marl::Scheduler::Worker::runUntilIdle()`](#marlschedulerworkerrununtilidle)
12 - [`marl::Scheduler::Worker::waitForWork()`](#marlschedulerworkerwaitforwork)
13 - [`marl::Scheduler::Worker::spinForWork()`](#marlschedulerworkerspinforwork)
14 - [`marl::Scheduler::Worker::suspend()`](#marlschedulerworkersuspend)
19 The `marl::Scheduler` is the most complex part of marl and is responsible for executing tasks and k…
28 Binding is made using the `marl::Scheduler::bind()` and `marl::Scheduler::unbind()` methods.
32 …rious synchronization primitives to be called without requiring a pointer to the `marl::Scheduler`.
43 `marl::Scheduler::Fiber` is the public fiber interface that is tightly coupled with the `marl::Sche…
45 Each `marl::Scheduler::Fiber` is permanently associated with a `marl::Scheduler::Worker`, and is gu…
74 The scheduler holds a number of `marl::Scheduler::Worker`s. Each worker holds:
85 - If the scheduler has no dedicated worker threads (`marl::Scheduler::config().workerThreads.count …
88 ### `marl::Scheduler::Worker::run()`
105 ### `marl::Scheduler::Worker::runUntilIdle()`
126 ### `marl::Scheduler::Worker::waitForWork()`
143 ### `marl::Scheduler::Worker::spinForWork()`
165 ### `marl::Scheduler::Worker::suspend()`
169 …blocks, then `Scheduler::Worker::suspend()` is called. `suspend()` begins by calling [`Scheduler::…
173 …s. This fiber is created to begin execution in [`marl::Scheduler::Worker::run()`](#marl::Scheduler…
185 …ted worker thread to call `marl::Scheduler::run()`, where as the Single-Threaded-Worker will only …
189 …ded-worker (STW) is created for each thread that is bound with a call to `marl::Scheduler::bind()`.
191 If the scheduler has no dedicated worker threads (`marl::Scheduler::config().workerThreads.count ==…
193 …ed. Instead, tasks are only executed whenever there's a call to [`marl::Scheduler::Worker::suspend…
194 …end) is common for STWs and MTWs, spawning new fibers that call [`marl::Scheduler::Worker::run()`]…
198 marl::Scheduler::Config cfg;
201 marl::Scheduler scheduler(cfg);
213 // marl::Event::wait() (indirectly) calls marl::Scheduler::Worker::suspend().
214 // marl::Scheduler::Worker::suspend() creates and switches to a fiber which
215 // calls marl::Scheduler::Worker::run() to run all enqueued tasks. Once the
216 // main fiber becomes unblocked, marl::Scheduler::Worker::runUntilIdle() will
224 …rkers are created when the `marl::Scheduler` is constructed with a positive number of worker threa…
226 Each MTW is paired with a new `std::thread` that begins by calling `marl::Scheduler::Worker::run()`.
228 When the worker is told to shutdown and all work is complete, `marl::Scheduler::Worker::run()` exit…