Skip to content

Rust Executors

Task executors for Rust, with work-stealing and channel-based thread pools and a benchmark suite for comparing scheduling choices.

Motivation and approach

I built Executors primarily for Kompact. I needed the equivalent of Java’s fork-join pool in Rust: a convenient way to schedule work that spawns more related work. That pattern comes up naturally in message-passing systems, where handling one message often creates work for other components.

Executors gives me control over that scheduling at a lower level than a runtime such as Tokio. Its focus is running tasks on thread pools, with a common interface for choosing between scheduling strategies.

Work-stealing executors keep tasks in worker-local queues and let idle workers take work from others. Channel-based executors use a shared queue. A benchmark suite supports comparisons between these approaches.

My contribution

I created the library as Kompact’s task scheduling foundation.

Outcome and current status

Executors is published as a standalone Rust crate and continues to be maintained alongside Kompact.