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

fix(maitake-sync): impl Future for mutex::Lock with generic ScopedRawMutex #517

Merged
merged 3 commits into from
Feb 6, 2025

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Feb 6, 2025

This commit fixes the trait bounds on the mutex::Lock type's Future
implementation so that it's present when used with an overridden
ScopedRawMutex, as well as the default DefaultMutex. Thanks to
@peterkrull for reporting this issue in this comment!

As noted in #516, I've also added tests for this, which wouldn't have
compiled prior to this change.

hawkw added 3 commits February 6, 2025 10:11
…dRawMutex`

This commit fixes the trait bounds on the `mutex::Lock` type's `Future`
implementation so that it's present when used with an overridden
`ScopedRawMutex`, as well as the default `DefaultMutex`. Thanks to
@peterkrull for reporting this issue in [this comment][1]!

As noted in #516, I've also added tests for this, which wouldn't have
compiled prior to this change.

[1]: #515 (comment)
@hawkw hawkw force-pushed the eliza/fix-lock-future branch from b61b490 to 60e76d7 Compare February 6, 2025 18:11
hawkw added a commit that referenced this pull request Feb 6, 2025
Depends on #517

As described in #516, this commit adds tests ensuring that `Future`
impls are always present for sync primitive future types when using
user-provided `ScopedRawMutex`/`RawMutex` impls. This should help
protect against future regressions.

Fixes #516
@hawkw hawkw enabled auto-merge (squash) February 6, 2025 18:18
@hawkw hawkw merged commit 12c5b21 into main Feb 6, 2025
18 checks passed
@hawkw hawkw deleted the eliza/fix-lock-future branch February 6, 2025 18:47
hawkw added a commit that referenced this pull request Feb 6, 2025
Depends on #517

As described in #516, this commit adds tests ensuring that `Future`
impls are always present for sync primitive future types when using
user-provided `ScopedRawMutex`/`RawMutex` impls. This should help
protect against future regressions.

Fixes #516
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.

1 participant