safina-executor
This is a safe Rust async executor.
It is part of safina, a safe async runtime.
Features
forbid(unsafe_code)- Depends only on
std - Good test coverage (100%)
Limitations
- Requires Rust
nightly, for Wake trait - Allocates memory
- Not optimized
Documentation
https://docs.rs/safina-executor
Examples
let executor = default;
let = channel;
executor.spawn;
receiver.recv.unwrap;
let result = block_on?;
let result = schedule_blocking.await?;
Alternatives
async-executor- Popular
- Dependencies have some
unsafecode
futures-executor- Very popular
- Full of
unsafe
tokio-executor- Very popular
- Fast
- Internally complicated
- Full of
unsafe
executors- Dependencies have lots of
unsafecode
- Dependencies have lots of
bastion-executor- Lots of
unsafecode
- Lots of
rayon_core- Generous amounts of
unsafecode
- Generous amounts of
pollster- Minimal
- Has a little
unsafecode
lelet- Automatically scales worker thread pool
- Lots of
unsafecode
fibers- Dependencies are full of unsafe
nostd_async- Has some
unsafecode
- Has some
embedded-executor- Generous amounts of
unsafecode
- Generous amounts of
spin_on- Minimal
pastsswitchyard- Lots of
unsafecode
- Lots of
sealrsrusty_pool- Automatically adjusts thread pool
- Dependencies are full of unsafe
Changelog
- v0.1.4 - Add
schedule_blockingandExecutor::schedule_blocking - v0.1.3
- Removed global executor. Users must explicitly create executor.
- Removed dependency on unstable
OnceCell. - Uses
safina_threadpoolinternally.
- v0.1.2 - Let callers pass futures to
spawnandblock_onwithout usingBox::pin. Addspawn_unpinandblock_on_unpinfor folks who need to avoid allocating. so callers don't have to. - v0.1.1 - Fix badge and update readme
- v0.1.0 - Renamed from
safina
TO DO
- DONE - Implement
spawn - DONE - Implement
block_on - DONE - Implement
increase_threads_to - DONE - Drop finished futures
- DONE - Handle task panic
- DONE - Add
stop_threads,allow_threads, andincrease_threads_to. - DONE - Add tests
- DONE - Add docs
- DONE - Publish on crates.io
- DONE - Add an
#[async_test]macro - Add a stress test
- Add a benchmark. See benchmarks in https://crates.io/crates/executors
- Make a version of the crate that uses
unsafe
once_celland unsafeRawWakerand builds with Ruststable. - Add an
#[async_main]macro
Release Process
- Edit
Cargo.tomland bump version number. - Run
./release.sh
License: Apache-2.0