// option. This file may not be copied, modified, or distributed
// except according to those terms.
+use core::prelude::*;
+
use boxed::Box;
use cmp;
use mem;
if ret as uint == 0 {
// be sure to not leak the closure
let _p: Box<Thunk> = mem::transmute(arg);
- panic!("failed to spawn native thread: {}", ret);
+ panic!("failed to spawn native thread: {:?}", ret);
}
return ret;
}
+pub unsafe fn set_name(name: &str) {
+ // Windows threads are nameless
+ // The names in MSVC debugger are obtained using a "magic" exception,
+ // which requires a use of C++ macros.
+ // See https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx
+}
+
pub unsafe fn join(native: rust_thread) {
use libc::consts::os::extra::INFINITE;
WaitForSingleObject(native, INFINITE);