-
Notifications
You must be signed in to change notification settings - Fork 765
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
build: update windows-sys
to 0.59.0
#1857
base: master
Are you sure you want to change the base?
build: update windows-sys
to 0.59.0
#1857
Conversation
d9500d9
to
f74b07f
Compare
src/sys/windows/named_pipe.rs
Outdated
unsafe impl Send for NamedPipe {} | ||
unsafe impl Sync for NamedPipe {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which field in Inner
is making this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may make more sense to implement these traits for Inner
instead, or to wrap the offending field in a newtype and implement them on that newtype.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which field in
Inner
is making this necessary?
We need to implement Send
and Sync
manually because HANDLE
is no longer considered thread-safe. I think your instinct is right, and we need to capture the overlapped I/O contract with types ourselves now.
Will take some time to dig into that contract, and report what I learn here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems much easier to reason about the specific APIs' usage of Handle
s, rather than a category of resource backing a Handle
, for the purpose of justifying unsafe impl {Send,Sync}
. I'll implement Send
and Sync
directly on iocp::CompletionPort
and named_pipe::Inner
first.
If there's desire to attempt categorizing types of resources behind Handle
s as thread-safe, maybe a follow-up PR would be best?
There's a build failure.
|
f74b07f
to
b3d675c
Compare
Ah, that was an interesting feature combination that I had to use to reproduce locally. 😅 Glad CI caught it! |
Any progress here ? |
Co-Authored-By: Erich Gubler <[email protected]>
b3d675c
to
066d1cd
Compare
Carries on the effort from #1820, with some fixes that should make tests compile now.