diff options
| author | Peter Atashian <retep998@gmail.com> | 2015-10-29 16:54:09 -0400 |
|---|---|---|
| committer | Peter Atashian <retep998@gmail.com> | 2015-12-04 20:09:30 -0500 |
| commit | 95cdada99a02c5abea4898f46e04f7a271419dac (patch) | |
| tree | b8865e6300269b2448f7a8a67db1af802222356d /src/libstd/sys/windows/thread.rs | |
| parent | f5150dd9b42d15563e18218910cafc0d4d053250 (diff) | |
| download | rust-95cdada99a02c5abea4898f46e04f7a271419dac.tar.gz rust-95cdada99a02c5abea4898f46e04f7a271419dac.zip | |
AsRawHandle and IntoRawHandle for JoinHandle
This allows users to get the HANDLE of a spawned thread on Windows Signed-off-by: Peter Atashian <retep998@gmail.com>
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 { |
