You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asyncband.apache.org by ti...@apache.org on 2026/10/03 06:36:58 UTC
(asyncband) 12/22: docs(spmc): describe the single internal mutex accurately
This is an automated email from the ASF dual-hosted git repository.
tisonkun pushed a commit to branch tison/deslopify
in repository https://gitbox.apache.org/repos/asf/asyncband.git
commit 8d37e8e93ace59d9d185d75412555f9767542fd3
Author: tison <wa...@gmail.com>
AuthorDate: Sat Oct 3 14:27:42 2026 +0800
docs(spmc): describe the single internal mutex accurately
Both constructors claimed operations acquire "internal mutexes", but the
queue state lives behind one Mutex, and the unbounded paragraph even
contradicted itself two sentences later. The mpmc and mpsc modules
already say "an internal mutex".
---
asyncband/src/spmc/bounded.rs | 2 +-
asyncband/src/spmc/unbounded.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/asyncband/src/spmc/bounded.rs b/asyncband/src/spmc/bounded.rs
index f164013..4ff7cda 100644
--- a/asyncband/src/spmc/bounded.rs
+++ b/asyncband/src/spmc/bounded.rs
@@ -29,7 +29,7 @@ use super::queue::Shared;
/// The queue stores at most `capacity` values. Sending waits for a receiver to free capacity when
/// the queue is full.
///
-/// Operations briefly acquire internal mutexes. No lock is held across an await point, while
+/// Operations briefly acquire an internal mutex. No lock is held across an await point, while
/// waking tasks, or while dropping messages. The `try_*` methods do not wait for capacity or
/// messages, but may wait to acquire a mutex.
///
diff --git a/asyncband/src/spmc/unbounded.rs b/asyncband/src/spmc/unbounded.rs
index 60e8947..5e97498 100644
--- a/asyncband/src/spmc/unbounded.rs
+++ b/asyncband/src/spmc/unbounded.rs
@@ -28,7 +28,7 @@ use super::queue::Shared;
///
/// Sends are synchronous and values may be buffered until available memory is exhausted.
///
-/// Operations briefly acquire internal mutexes. No lock is held across an await point, while
+/// Operations briefly acquire an internal mutex. No lock is held across an await point, while
/// waking tasks, or while dropping messages. Sending and trying to receive may wait to acquire
/// a mutex, but never wait for capacity or new messages.
pub fn unbounded<T>() -> (UnboundedSender<T>, UnboundedReceiver<T>) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@asyncband.apache.org
For additional commands, e-mail: commits-help@asyncband.apache.org