Skip to main content

Crate scheduler

Crate scheduler 

Source

Structs§

BackgroundExecutor
DedicatedExecutor
A long-lived handle to one dedicated session: every future spawned on it runs on that session’s single thread, never on the background pool.
FallibleTask
A task that returns Option<T> instead of panicking when cancelled.
Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
LocalExecutor
A !Send executor pinned to a single session. Tasks spawned on it run in order on whichever thread drains the dispatch destination supplied at construction time — typically the main thread for the default session, or a dedicated OS thread for sessions created by spawn_dedicated_thread.
RunnableMeta
Metadata attached to runnables for debugging and profiling.
SessionId
SharedRng
A wrapper around Arc<Mutex<StdRng>> that provides convenient methods for random number generation without requiring explicit locking.
SpawnTime
Task
Task is a primitive that allows work to happen in the background.
TestClock
TestScheduler
TestSchedulerConfig
Timer
Yield

Enums§

Priority
Task priority for background tasks.

Traits§

Clock
Scheduler

Functions§

spawn_dedicated_thread
Spawn work on a fresh OS thread that’s exclusive to the returned task and anything spawned on the executor it provides. Blocking syscalls inside that work don’t disturb any other executor in the process.
test_scheduler_created
Whether this process has created a TestScheduler.