compio-dispatcher
Multithreading dispatcher for compio.
This crate provides utilities to dispatch tasks across multiple compio runtime threads, enabling parallel processing while maintaining the benefits of compio's thread-per-core model.
Usage
Use compio directly with dispatcher feature enabled:
Example:
use Dispatcher;
let dispatcher = builder.worker_threads.build.unwrap;
let result = dispatcher.dispatch.await;
Notice that you're dispatching a Send closure that returns Future to the other threads. The Future returned by the closure does not need to be Send, which is convenient since lots of the operations are single-thread and not Send in compio.