1 //! Windows-specific extensions to primitives in the [`std::thread`] module.
3 //! [`std::thread`]: crate::thread
5 #![stable(feature = "thread_extensions", since = "1.9.0")]
7 use crate::os::windows::io::{AsRawHandle, IntoRawHandle, RawHandle};
8 use crate::sys_common::{AsInner, IntoInner};
11 #[stable(feature = "thread_extensions", since = "1.9.0")]
12 impl<T> AsRawHandle for thread::JoinHandle<T> {
14 fn as_raw_handle(&self) -> RawHandle {
15 self.as_inner().handle().as_raw_handle() as *mut _
19 #[stable(feature = "thread_extensions", since = "1.9.0")]
20 impl<T> IntoRawHandle for thread::JoinHandle<T> {
22 fn into_raw_handle(self) -> RawHandle {
23 self.into_inner().into_handle().into_raw_handle() as *mut _