Struct desync::scheduler::Scheduler [] [src]

pub struct Scheduler { /* fields omitted */ }

The scheduler is used to schedule tasks onto a pool of threads

Methods

impl Scheduler
[src]

[src]

Creates a new scheduler

(There's usually only one scheduler)

[src]

Changes the maximum number of threads this scheduler can spawn (existing threads are not despawned by this method)

[src]

Despawns threads if we're running more than the maximum number

Must not be called from a scheduler thread (as it waits for the threads to despawn)

[src]

Spawns a thread in this scheduler

[src]

Creates a new job queue for this scheduler

[src]

Schedules a job on this scheduler, which will run after any jobs that are already in the specified queue and as soon as a thread is available to run it.

[src]

Schedules a job to run and returns a future for retrieving the result

[src]

Pauses a queue until a particular future has completed, before performing a task with the result of that future

[src]

Requests that a queue be suspended once it has finished all of its active jobs

[src]

Resumes a queue that was previously suspended

[src]

Schedules a job on this scheduler, which will run after any jobs that are already in the specified queue. This function will not return until the job has completed.

Trait Implementations

impl Debug for Scheduler
[src]

[src]

Formats the value using the given formatter.