diff options
Diffstat (limited to 'src/libstd/sys/windows/thread.rs')
| -rw-r--r-- | src/libstd/sys/windows/thread.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs index 5a376a867ee..2cdd86e88b0 100644 --- a/src/libstd/sys/windows/thread.rs +++ b/src/libstd/sys/windows/thread.rs @@ -61,7 +61,11 @@ impl Thread { } pub fn join(self) { - unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE); } + let rc = unsafe { c::WaitForSingleObject(self.handle.raw(), c::INFINITE) }; + if rc == c::WAIT_FAILED { + panic!("failed to join on thread: {}", + io::Error::last_os_error()); + } } pub fn yield_now() { |
