You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
4
4
5
5
## Unreleased
6
6
7
+
### Breaking changes
8
+
9
+
* Group all channel families under `mea::channel` and replace the previous root-level oneshot, mpsc, and broadcast implementations with a shared correctness-first design.
10
+
* Use `is_disconnected` consistently for channel endpoint state queries.
11
+
12
+
### New features
13
+
14
+
* Add SPSC, MPSC, SPMC, and MPMC queues with rendezvous, bounded, and unbounded capacities.
15
+
* Add explicit bounded-queue replacement strategies that return the displaced value.
16
+
* Add overflow, backpressure, and unbounded broadcast retention policies.
17
+
* Add a coalescing watch channel.
18
+
* Add single-producer and multi-producer Disruptor-style multicast sequencers.
19
+
* Add `sync`, `channel`, `coordination`, and `atomic` public module groups for the proposed 0.7 layout.
20
+
7
21
### Bug fixes
8
22
9
23
* Prevent `OwnedMappedMutexGuard` from allowing invalid lifetime coercions. ([#121](https://github.com/fast/mea/pull/121))
Copy file name to clipboardExpand all lines: README.md
+19-7Lines changed: 19 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ MEA is a runtime-agnostic library providing essential synchronization primitives
22
22
23
23
## Features
24
24
25
+
### Synchronization
26
+
25
27
*[**Barrier**](https://docs.rs/mea/*/mea/barrier/struct.Barrier.html): A synchronization primitive that enables tasks to wait until all participants arrive.
26
28
*[**Condvar**](https://docs.rs/mea/*/mea/condvar/struct.Condvar.html): A condition variable that allows tasks to wait for a notification.
27
29
*[**Latch**](https://docs.rs/mea/*/mea/latch/struct.Latch.html): A synchronization primitive that allows one or more tasks to wait until a set of operations completes.
@@ -32,12 +34,23 @@ MEA is a runtime-agnostic library providing essential synchronization primitives
32
34
*[**RwLock**](https://docs.rs/mea/*/mea/rwlock/struct.RwLock.html): A reader-writer lock that allows multiple readers or a single writer at a time.
33
35
*[**Semaphore**](https://docs.rs/mea/*/mea/semaphore/struct.Semaphore.html): A synchronization primitive that controls access to a shared resource.
34
36
*[**WaitGroup**](https://docs.rs/mea/*/mea/waitgroup/struct.WaitGroup.html): A synchronization primitive that allows waiting for multiple tasks to complete.
37
+
38
+
### Channels
39
+
40
+
All channel families are grouped under [**mea::channel**](https://docs.rs/mea/*/mea/channel/):
41
+
42
+
***oneshot** transfers one value once.
43
+
***spsc**, **mpsc**, **spmc**, and **mpmc** provide rendezvous, bounded, and unbounded competing-consumer queues.
44
+
***broadcast** provides bounded overflow, bounded backpressure, and unbounded multicast retention.
45
+
***watch** distributes the latest state while coalescing intermediate versions.
46
+
***disruptor** provides single-producer and multi-producer bounded multicast sequencers.
47
+
48
+
See the [channel design for 0.7](docs/channel-design.md) for the topology matrix, overload policies, cancellation rules, Disruptor invariants, and proposed Cargo feature groups.
49
+
50
+
### Coordination and atomic utilities
51
+
35
52
*[**admission::FairShare**](https://docs.rs/mea/*/mea/admission/struct.FairShare.html): A work-conserving admission policy that fairly shares bounded concurrency across keys.
36
53
*[**atomicbox**](https://docs.rs/mea/*/mea/atomicbox/): A safe, owning version of AtomicPtr for heap-allocated data.
37
-
*[**broadcast**](https://docs.rs/mea/*/mea/broadcast/): A multi-producer, multi-consumer broadcast channel.
38
-
*[**mpsc::bounded**](https://docs.rs/mea/*/mea/mpsc/fn.bounded.html): A multi-producer, single-consumer bounded queue for sending values between asynchronous tasks.
39
-
*[**mpsc::unbounded**](https://docs.rs/mea/*/mea/mpsc/fn.unbounded.html): A multi-producer, single-consumer unbounded queue for sending values between asynchronous tasks.
40
-
*[**oneshot::channel**](https://docs.rs/mea/*/mea/oneshot/): A one-shot channel for sending a single value between tasks.
41
54
*[**shutdown**](https://docs.rs/mea/*/mea/shutdown/): A composite synchronization primitive for managing shutdown signals.
42
55
*[**singleflight::Group**](https://docs.rs/mea/*/mea/singleflight/): A duplicate function call suppression mechanism.
43
56
@@ -55,7 +68,7 @@ All synchronization primitives in this library are runtime-agnostic, meaning the
55
68
56
69
## Thread Safety
57
70
58
-
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.
71
+
Types implement `Send`when their contained values can cross thread boundaries. A channel endpoint is `Sync` and cloneable when that endpoint supports multiple producers or multiple consumers; a single-side endpoint deliberately requires exclusive access.
59
72
60
73
## Minimum Supported Rust Version (MSRV)
61
74
@@ -82,8 +95,7 @@ This crate collects runtime-agnostic synchronization primitives from spare parts
82
95
***Semaphore** is derived from `tokio::sync::Semaphore`, without `close` method since it is quite tricky to use. And thus, this semaphore doesn't have the limitation of max permits. Besides, new methods like `forget_exact` are added to fit the specific use case.
83
96
***WaitGroup** is inspired by [`waitgroup-rs`](https://github.com/laizy/waitgroup-rs), providing different API flavor with a different implementation based on the internal `CountdownState` primitive.
84
97
***atomicbox** is forked from [`atomicbox`](https://github.com/jorendorff/atomicbox/) at commit 07756444.
85
-
***broadcast::overflow::channel** is derived from `tokio::sync::broadcast::channel`, with a different implementation based on the internal `WaitSet` primitive.
86
-
***oneshot::channel** is derived from [`oneshot`](https://github.com/faern/oneshot), with significant simplifications since we need not support synchronized receiving functions.
98
+
***channel** is a correctness-first implementation of one-shot, competing-consumer, multicast, coalescing, and Disruptor-style sequenced channels using runtime-agnostic task parking.
0 commit comments