diff options
| author | bors <bors@rust-lang.org> | 2015-12-05 20:49:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-12-05 20:49:16 +0000 |
| commit | aad4e5665e81a3ec998b3648d395d0eb99a7500b (patch) | |
| tree | 7c9286e32c368bcfb7eb295fd4b35e9eb7285c01 /src/libstd/sys/windows/thread.rs | |
| parent | 9f715e98925adbf205bccd8a044266c77197db50 (diff) | |
| parent | 9749a193d629dd723562004879bca3e2d47e25a1 (diff) | |
| download | rust-aad4e5665e81a3ec998b3648d395d0eb99a7500b.tar.gz rust-aad4e5665e81a3ec998b3648d395d0eb99a7500b.zip | |
Auto merge of #30177 - retep998:handling-threads, r=alexcrichton
Allows a `HANDLE` to be extracted from a `JoinHandle` on Windows. Allows a `pthread_t` to be extracted from a `JoinHandle` everywhere else. Because https://github.com/rust-lang/rust/pull/29461 was closed. r? @alexcrichton
Diffstat (limited to 'src/libstd/sys/windows/thread.rs')
| -rw-r--r-- | src/libstd/sys/windows/thread.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs index a6e6cc94b76..1ba85867563 100644 --- a/src/libstd/sys/windows/thread.rs +++ b/src/libstd/sys/windows/thread.rs @@ -77,6 +77,10 @@ impl Thread { c::Sleep(super::dur2timeout(dur)) } } + + pub fn handle(&self) -> &Handle { &self.handle } + + pub fn into_handle(self) -> Handle { self.handle } } pub mod guard { |
