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

Locking api changes #5

Merged
merged 3 commits into from
Oct 31, 2024
Merged

Locking api changes #5

merged 3 commits into from
Oct 31, 2024

Conversation

pedromfedricci
Copy link
Owner

BREAKING

  • Renamed Mutex::lock to Mutex::lock_with, to better communicate that it requires a MutexNode allocation from caller.

Added

  • New Mutex::lock method, this one transparently allocates a node, so that it does not take a MutexNode parameter.
  • New Mutex::lock_then method, which does not take a node parameter, but takes a closure with a single MutexGuard parameter and returns a generic value.
  • New Mutex::lock_with_then method, which does take a node parameter, and also a closure with a single MutexGuard parameter and returns a generic value.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 97.19%. Comparing base (7eb23b2) to head (5b399cd).

Files with missing lines Patch % Lines
src/raw/mutex.rs 64.28% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##              main       #5      +/-   ##
===========================================
- Coverage   100.00%   97.19%   -2.81%     
===========================================
  Files            5        5              
  Lines          157      178      +21     
===========================================
+ Hits           157      173      +16     
- Misses           0        5       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pedromfedricci pedromfedricci merged commit 0f9348c into main Oct 31, 2024
10 checks passed
@pedromfedricci pedromfedricci deleted the locking-api-changes branch October 31, 2024 18:13
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