Notify receivers in mpsc channel OwnedPermit::release() method#8075
Merged
Darksonn merged 2 commits intoMay 7, 2026
Conversation
Member
Author
|
This probably requires a backport, so it should not be merged until base branch is updated. |
martin-g
reviewed
Apr 23, 2026
d1db1a9 to
855f2f1
Compare
martin-g
approved these changes
May 4, 2026
This was referenced May 7, 2026
Merged
eleboucher
pushed a commit
to eleboucher/towonel
that referenced
this pull request
May 9, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | workspace.dependencies | patch | `1.52.2` → `1.52.3` | --- ### Release Notes <details> <summary>tokio-rs/tokio (tokio)</summary> ### [`v1.52.3`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.52.3): Tokio v1.52.3 [Compare Source](tokio-rs/tokio@tokio-1.52.2...tokio-1.52.3) ### 1.52.3 (May 8th, 2026) ##### Fixed - sync: fix underflow in mpsc channel `len()` ([#​8062]) - sync: notify receivers in mpsc `OwnedPermit::release()` method ([#​8075]) - sync: require that an `RwLock` has `max_readers != 0` ([#​8076]) - sync: return `Empty` from `try_recv()` when mpsc is closed with outstanding permits ([#​8074]) [#​8062]: tokio-rs/tokio#8062 [#​8074]: tokio-rs/tokio#8074 [#​8075]: tokio-rs/tokio#8075 [#​8076]: tokio-rs/tokio#8076 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/towonel/pulls/36
eleboucher
pushed a commit
to eleboucher/towonel
that referenced
this pull request
May 20, 2026
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [tokio](https://tokio.rs) ([source](https://github.com/tokio-rs/tokio)) | workspace.dependencies | patch | `1.52.2` → `1.52.3` | --- ### Release Notes <details> <summary>tokio-rs/tokio (tokio)</summary> ### [`v1.52.3`](https://github.com/tokio-rs/tokio/releases/tag/tokio-1.52.3): Tokio v1.52.3 [Compare Source](tokio-rs/tokio@tokio-1.52.2...tokio-1.52.3) ### 1.52.3 (May 8th, 2026) ##### Fixed - sync: fix underflow in mpsc channel `len()` ([#​8062]) - sync: notify receivers in mpsc `OwnedPermit::release()` method ([#​8075]) - sync: require that an `RwLock` has `max_readers != 0` ([#​8076]) - sync: return `Empty` from `try_recv()` when mpsc is closed with outstanding permits ([#​8074]) [#​8062]: tokio-rs/tokio#8062 [#​8074]: tokio-rs/tokio#8074 [#​8075]: tokio-rs/tokio#8075 [#​8076]: tokio-rs/tokio#8076 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/towonel/pulls/36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
OwnedPermit::release()method is missing a check for whether the receiver should be woken up. This results in lost wakeups when combined withReceiver::close().This bug was discovered by asking Gemini to look for bugs in the
releasemethod oftokio/src/sync/mpsc/bounded.rs.