Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: use usize instead of u32 for SemaphorePermit::split #6478

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

Darksonn
Copy link
Contributor

Using u32 in the semaphore methods was a design mistake, see #4446. We should not add more methods using u32.

This is not a breaking change since we have not made a release since #6472.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-sync Module: tokio/sync labels Apr 11, 2024
@Darksonn Darksonn requested a review from mox692 April 11, 2024 11:57
@github-actions github-actions bot added the R-loom-sync Run loom sync tests on this PR label Apr 11, 2024
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, modulo a tiny style nit --- feel free to ignore it.

tokio/src/sync/semaphore.rs Outdated Show resolved Hide resolved
tokio/src/sync/semaphore.rs Outdated Show resolved Hide resolved
Co-authored-by: Eliza Weisman <eliza@elizas.website>
@Darksonn Darksonn enabled auto-merge (squash) April 11, 2024 17:11
@Darksonn Darksonn merged commit 90e20bc into tokio-rs:master Apr 11, 2024
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-sync Module: tokio/sync R-loom-sync Run loom sync tests on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants