Skip to main content

Module executor

Module executor 

Source
Expand description

Where guinea’s own background work runs.

Everything guinea schedules - a background task, an answer carried back to the UI thread - goes through here rather than straight to tokio, so that a test can put a [Seeded] executor on its thread and decide the order itself. Outside such a test this is tokio::spawn.

Functions§

random_delay
Gives way a random number of times - as many as the seed says under a [Seeded] executor, once outside one.
spawn
Runs task in the background.
yield_now
Gives way once: the task is woken and set aside, and whatever else is ready runs before it resumes.