moirai-executor 0.6.1

Hybrid executor implementation for Moirai concurrency library
Documentation

moirai-executor

crates.io docs.rs

The hybrid executor for the Moirai concurrency library. Synchronous, asynchronous, and blocking work run on one unified scheduler facade: sync and async-ready jobs use the compute work-stealing pool, while potentially blocking work uses a lazily initialized, bounded lane isolated from that pool.

  • Static work-class routing through zero-sized markers.
  • Per-worker Chase-Lev deques indexed by moirai_core::Priority::index.
  • SchedulerScope for completion-only borrowing of non-'static data.
[dependencies]
moirai-executor = "0.5"
// Moirai-owned synchronous wait primitive: bridges a future into a sync
// boundary without constructing the process-wide scheduler.
let value = moirai_executor::block_on(async { 21 * 2 });
assert_eq!(value, 42);

Applications that call melinoe::sync::partition_* directly should initialize the bridge during startup so the first partition uses the Moirai pool:

moirai_executor::initialize();

The operation is idempotent and refreshes the process-global registration after Melinoe's test or lifecycle reset hook.

Most users depend on the moirai-runtime facade instead.

Full documentation: https://docs.rs/moirai-executor

License

Licensed under either of Apache-2.0 or MIT at your option.