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

AsRawHandle IntoRawHandle and JoinHandleExt for JoinHandle #30177

Merged
merged 2 commits into from
Dec 5, 2015

Conversation

retep998
Copy link
Member

@retep998 retep998 commented Dec 2, 2015

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

@retep998 retep998 force-pushed the handling-threads branch 2 times, most recently from a252dc7 to 79bc94e Compare December 3, 2015 09:10
@@ -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;
Copy link
Member

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)

@alexcrichton
Copy link
Member

Thanks! Just one nit and otherwise r=me

@retep998
Copy link
Member Author

retep998 commented Dec 4, 2015

Addressed nit.

@alexcrichton
Copy link
Member

@bors: r+ 9376f707524f291021a5621ae7dccf20db996027

Thanks!

@bors
Copy link
Contributor

bors commented Dec 4, 2015

⌛ Testing commit 9376f70 with merge 71fd63f...

@bors
Copy link
Contributor

bors commented Dec 4, 2015

💔 Test failed - auto-win-msvc-64-opt

// except according to those terms.

//! Extensions to `std::thread` for Windows.

Copy link
Member Author

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?

Copy link
Member

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>
@retep998
Copy link
Member Author

retep998 commented Dec 5, 2015

Added that missing stability attribute.

@alexcrichton
Copy link
Member

@bors: r+ 9749a19

@bors
Copy link
Contributor

bors commented Dec 5, 2015

⌛ Testing commit 9749a19 with merge aad4e56...

bors added a commit that referenced this pull request Dec 5, 2015
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
@bors bors merged commit 9749a19 into rust-lang:master Dec 5, 2015
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.

3 participants