-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
AsRawHandle IntoRawHandle and JoinHandleExt for JoinHandle #30177
Conversation
a252dc7
to
79bc94e
Compare
@@ -25,6 +25,8 @@ use os::unix::raw::{uid_t, gid_t}; | |||
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = i64; | |||
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = i64; | |||
|
|||
#[unstable(feature = "pthread_t", issue = "0")] pub type pthread_t = usize; |
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.
Could you connect all these issues to the same tracking issue as below? (#29791)
Thanks! Just one nit and otherwise r=me |
79bc94e
to
9376f70
Compare
Addressed nit. |
@bors: r+ 9376f707524f291021a5621ae7dccf20db996027 Thanks! |
⌛ Testing commit 9376f70 with merge 71fd63f... |
💔 Test failed - auto-win-msvc-64-opt |
// except according to those terms. | ||
|
||
//! Extensions to `std::thread` for Windows. | ||
|
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.
Oh dang, I need a stability attribute here. Which feature do I use?
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's fine to leave the module unstable (there's actually no need for it to be public), and just point it to the same pthread_t issue.
This allows users to get the HANDLE of a spawned thread on Windows Signed-off-by: Peter Atashian <retep998@gmail.com>
Signed-off-by: Peter Atashian <retep998@gmail.com>
9376f70
to
9749a19
Compare
Added that missing stability attribute. |
Allows a `HANDLE` to be extracted from a `JoinHandle` on Windows. Allows a `pthread_t` to be extracted from a `JoinHandle` everywhere else. Because #29461 was closed. r? @alexcrichton
Allows a
HANDLE
to be extracted from aJoinHandle
on Windows.Allows a
pthread_t
to be extracted from aJoinHandle
everywhere else.Because #29461 was closed.
r? @alexcrichton