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

test(maitake-sync): test futures impl Future #518

Merged
merged 6 commits into from
Feb 6, 2025
Merged

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented 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 added 4 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)
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
Base automatically changed from eliza/fix-lock-future to main February 6, 2025 18:47
@hawkw
Copy link
Owner Author

hawkw commented Feb 6, 2025

Oh, ugh, some of these tests don't actually work, as they use APIs where creating the future actually does attempt to lock immediately. I'll rework it to be based on the types instead.

@hawkw hawkw enabled auto-merge (squash) February 6, 2025 19:02
@hawkw hawkw merged commit dd00208 into main Feb 6, 2025
18 checks passed
@hawkw hawkw deleted the eliza/test-future-impls branch February 6, 2025 19:35
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.

maitake-sync: test sync type Future impls (etc) with overridden ScopedRawMutex
1 participant