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

refact!: require unsafe for Relax #14

Merged
merged 1 commit into from
Jul 27, 2024
Merged

Conversation

pedromfedricci
Copy link
Owner

Breaking changes:

  • mcslock::relax::Relax is now properly marked as a unsafe trait. There is a safety invariant that implementers must satisfy that was previously overlooked and undocumented. Relax functions must not exit the thread, doing so is undefined behavior.
  • mcslock::relax::Relax no longer requires that types must also implement Default.
  • mcslock::relax::Relax now requires implementing the new function, which is now used to create the initial value. Previously the value that was created by a type's Default::default implementation.
  • All relax types under mcslock::relax::* no longer implement Default.

@codecov-commenter
Copy link

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.51%. Comparing base (aceb758) to head (3ef9f61).

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
+ Coverage   99.48%   99.51%   +0.02%     
==========================================
  Files           5        5              
  Lines         195      205      +10     
==========================================
+ Hits          194      204      +10     
  Misses          1        1              

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

@pedromfedricci pedromfedricci merged commit dbde0cc into main Jul 27, 2024
9 checks passed
@pedromfedricci pedromfedricci deleted the fix_relax_must_be_unsafe branch July 27, 2024 21:58
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