Skip to main content

run_workstealing_seeded

Function run_workstealing_seeded 

Source
pub fn run_workstealing_seeded<'env, B>(
    config: SchedulerConfig,
    seed: SchedSeed,
    main: SpawnDesc,
    build: B,
) -> WsOutcome
where B: Fn(SpawnDesc) -> Box<dyn Task<'env> + 'env> + Sync,
Expand description

Run a concurrent program on the work-stealing M:N driver under seed.

build turns a Send SpawnDesc into a worker-local !Send task body; it is cloned once per worker, so each worker constructs its tasks over its own resources (e.g. its own program clone) and no body ever crosses a thread. The coordinator owns the single Scheduler + Chooser, so the seeded trace is identical to the cooperative run; workers only poll task bodies in parallel.