Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ All notable changes to this project will be documented in this file.
* Prevent deadlocks in `singleflight::Group::work` and `try_work` when a duplicate key's destructor calls back into the same group.
* Fix undefined behavior when sending or dropping a oneshot sender races with receiver completion or cancellation.

### Improvements

* Add a lock-free fast path for releasing `Semaphore` permits while permits remain available, which speeds up dropping `RwLock` read guards, releasing multi-permit `Semaphore` permits, and returning objects to a bounded pool that is not at capacity. `Mutex` releases are unchanged.

### Notable changes

* Executor waker operations, including cloning, waking, and dropping, are expected not to panic; recovery from panicking waker callbacks is no longer supported.
Expand Down
4 changes: 2 additions & 2 deletions asyncband/src/broadcast/mpmc/bounded/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<T> Shared<T> {
// subscription.
let waiting = self.waiting_senders();
if freed > 0 && waiting > 0 {
self.tx_permits.release_if_nonempty(freed.min(waiting));
self.tx_permits.release_if_waiters(freed.min(waiting));
}
}

Expand Down Expand Up @@ -323,7 +323,7 @@ impl<T> BoundedSender<T> {
};

loop {
// Enqueue before rechecking. `release_if_nonempty` adds nothing when no
// Enqueue before rechecking. `release_if_waiters` adds nothing when no
// producer is queued, so a reclaim landing between the recheck and the
// registration would otherwise drop its wake-up and park this producer for
// good. Registering first orders this producer's semaphore acquisition ahead
Expand Down
Loading
Loading