We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbb9568 commit 719a595Copy full SHA for 719a595
src/libstd/thread/mod.rs
@@ -391,6 +391,7 @@ impl Builder {
391
}
392
393
/// TODO: Doc
394
+ #[unstable(feature = "thread_spawn_unchecked", issue = "0")]
395
pub unsafe fn spawn_unchecked<'a, F, T>(self, f: F) -> io::Result<JoinHandle<T>> where
396
F: FnOnce() -> T, F: Send + 'a, T: Send + 'a
397
{
@@ -421,9 +422,7 @@ impl Builder {
421
422
};
423
424
Ok(JoinHandle(JoinInner {
- native: unsafe {
425
- Some(imp::Thread::new(stack_size, Box::new(main))?)
426
- },
+ native: Some(imp::Thread::new(stack_size, Box::new(main))?),
427
thread: my_thread,
428
packet: Packet(my_packet),
429
}))
0 commit comments