safina-sync
This is a safe Rust library for sharing or sending data between async tasks.
It is part of safina, a safe async runtime.
Features
forbid(unsafe_code)- Depends only on
std - Good test coverage (100%)
- Works with
safina-executoror any async executor
Limitations
- Allocates
Documentation
Examples
use Arc;
use async_test;
use Mutex;
let shared_counter: = get_shared_data;
some_async_fn.await; // Await is ok after releasing MutexGuard.
Alternatives
- async-lock
- Contains a little
unsafecode
- Contains a little
- futures-locks
- Contains a little
unsafecode
- Contains a little
- futures-util
- Very popular
- Full of
unsafe
- tokio-sync
- Very popular
- Fast
- Internally incredibly complicated
- Full of
unsafe
Changelog
- v0.1.3 - Fix Promise type parameter
- v0.1.2 - Add Promise
- v0.1.1 - Improve Mutex performance when there are many waiters
- v0.1.0 - First published version
TO DO
- DONE - Implement
Mutexwith tests & docs - DONE - Publish on crates.io
- DONE - Add
Promise - Add
Barrier - Add
RwLock - Add
WaitableBool - Add
Channel(single receiver) - Add
UnboundedChannel - Add
WaitableQueue(multiple receivers) - Add
UnboundedWaitableQueue - Add
Topic(copies message to every receiver)
Release Process
- Edit
Cargo.tomland bump version number. - Run
./release.sh
License: Apache-2.0