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

windows: impl ThreadParkerT / UnparkHandleT. #396

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

waywardmonkeys
Copy link
Contributor

These imports were introduced in 2fb27d3 and were unused at the time and remain so.

@waywardmonkeys
Copy link
Contributor Author

Ah, it was unused on Windows, but not Linux, because src/thread_parker/windows/mod.rs has those functions implemented by ThreadParker directly rather than ThreadParkerT (and same for UnparkHandleT stuff).

Windows was implementing the same functions directly on its
`ThreadParker` and `UnparkHandle` (but with some functions
not marked as `unsafe`).

This changes the Windows implementation to match the other platforms.

This fixes unused warnings about imports of those types when
building on Windows.
@waywardmonkeys waywardmonkeys changed the title fix: Unused imports: ThreadParkerT, UnparkHandleT. windows: impl ThreadParkerT / UnparkHandleT. Aug 9, 2023
@waywardmonkeys
Copy link
Contributor Author

The initial version of this patch did something different as I had misunderstood the problem. When building on Windows, there were some warnings about unused imports and I mistakenly throught the imports were unused rather than realizing that the actual issue was that the Windows code wasn't correctly implementing those traits.

@Amanieu Amanieu merged commit c0ebcd7 into Amanieu:master Aug 9, 2023
37 checks passed
@waywardmonkeys waywardmonkeys deleted the fix-unused-warnings branch August 9, 2023 05:53
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