[][src]Crate fast_async_mutex

fast_async_mutex it is a lib which provide asynchronous locking mechanisms, which used spinlock algorithm. It's maybe very efficient because when mutex tries to acquire data unsuccessfully, these returning control to an async runtime back. This lib built only on atomics and don't use others std synchronous data structures, which make this lib so fast.

Modules

mutex

The simple Mutex, which will provide unique access to you data between multiple threads/futures.

mutex_ordered

The Ordered Mutex has its mechanism of locking order when you have concurrent access to data. It will work well when you needed step by step data locking like sending UDP packages in a specific order.

rwlock

The RW Lock mechanism accepts you get concurrent shared access to your data without waiting. And get unique access with locks like a Mutex.

rwlock_ordered

The RW Lock mechanism accepts you get shared access to your data without locking. The Ordered RW Lock will be locking all reads, which starting after write and unlocking them only when write will realize. It may be slow down the reads speed, but decrease time to write on systems, where it is critical.

Macros

impl_deref
impl_deref_mut
impl_drop_guard
impl_drop_guard_future
impl_drop_guard_self
impl_send_sync_mutex
impl_send_sync_rwlock