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

Add get_mut() to Mutex and RwLock #322

Merged
merged 2 commits into from
Aug 9, 2023
Merged

Conversation

akonradi
Copy link
Contributor

@akonradi akonradi commented Aug 2, 2023

Add the standard library get_mut() method to Mutex and RwLock. This provides mutable access without locking for callers who already hold a &mut Mutex or &mut RwLock.

Add the standard library get_mut() method to Mutex and RwLock. This
provides mutable access without locking for callers who already hold a
&mut Mutex or &mut RwLock.
Copy link
Member

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks!

src/sync/rwlock.rs Outdated Show resolved Hide resolved
src/sync/mutex.rs Outdated Show resolved Hide resolved
@taiki-e taiki-e merged commit ddf871f into tokio-rs:master Aug 9, 2023
@taiki-e taiki-e mentioned this pull request Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants