Expand description
§Mea - Make Easy Async
mea is a runtime-agnostic library providing essential synchronization primitives for
asynchronous Rust programming. The library offers a collection of well-tested, efficient
synchronization tools that work with any async runtime.
§Features
Barrier: A synchronization point where multiple tasks can wait until all participants arriveCondvar: A condition variable that allows tasks to wait for a notificationLatch: A single-use barrier that allows one or more tasks to wait until a signal is givenMutex: A mutual exclusion primitive for protecting shared dataRwLock: A reader-writer lock that allows multiple readers or a single writer at a timeSemaphore: A synchronization primitive that controls access to a shared resourceWaitGroup: A synchronization primitive that allows waiting for multiple tasks to complete
§Runtime Agnostic
All synchronization primitives in this library are runtime-agnostic, meaning they can be used with any async runtime like Tokio, async-std, or others. This makes the library highly versatile and portable.
§Thread Safety
All types in this library implement Send and Sync, making them safe to share across thread
boundaries. This is essential for concurrent programming where data needs to be accessed from
multiple threads.
Modules§
- barrier
- A synchronization primitive that enables multiple tasks to wait for each other.
- condvar
- A condition variable that allows tasks to wait for a notification.
- latch
- A countdown latch that allows one or more tasks to wait until a set of operations completes.
- mutex
- An async mutex for protecting shared data.
- rwlock
- A reader-writer lock that allows multiple readers or a single writer at a time.
- semaphore
- An async counting semaphore for controlling access to a set of resources.
- waitgroup
- A synchronization primitive for waiting on multiple tasks to complete.