futures-cputask allows you to turn long-running CPU tasks into a async function that runs on a secondary threadpool.
While futures-preview allows execution of tasks, it runs it on the main threadpool, which clogs up one of the threads while the future is run. Running it on a secondary threadpool allows for potentially higher throughput.
This crate supports multiple threadpool implementations, namely the one found in
threadpool and the one found in
You can add support for other threadpool implementations by using the
SyncThreadPool trait found
in this crate
Runs a task in the global threadpool
Runs a task in an asynchronous threadpool
Makes a synchronous function asynchronous using futures-cputask