This is a safe Rust async executor.
Related crates:
- safina-async-test
- macro for running async tests
- safina-executor
- safe async executor
- safina-select
- safe async sleep functions
- safina-timer
- safe async sleep functions
forbid(unsafe_code)
std
nightly
, for
OnceCell
and
Wake traithttps://docs.rs/safina-executor
rust
safina_executor::increase_threads_to(1);
let (sender, receiver) = std::sync::mpsc::channel();
safina_executor::spawn(Box::pin(async move {
sender.send(()).unwrap();
}));
receiver.recv().unwrap();
rust
std::thread::spawn(safina_executor::work);
let result = safina_executor::block_on(Box::pin(async {
prepare_request().await?;
execute_request().await
}))?;
unsafe
codeunsafe
codeunsafe
Cargo.toml
and bump version number../release.sh
spawn
block_on
increase_threads_to
stop_threads
, allow_threads
, and increase_threads_to
.once_cell
and unsafe RawWaker
and builds with Rust stable
.License: Apache-2.0