Update mod.rs
removes unnecessary `unsafe`, adds `unstable` attribute
This commit is contained in:
parent
fbb95689d6
commit
719a59586a
1 changed files with 2 additions and 3 deletions
|
@ -391,6 +391,7 @@ impl Builder {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO: Doc
|
/// TODO: Doc
|
||||||
|
#[unstable(feature = "thread_spawn_unchecked", issue = "0")]
|
||||||
pub unsafe fn spawn_unchecked<'a, F, T>(self, f: F) -> io::Result<JoinHandle<T>> where
|
pub unsafe fn spawn_unchecked<'a, F, T>(self, f: F) -> io::Result<JoinHandle<T>> where
|
||||||
F: FnOnce() -> T, F: Send + 'a, T: Send + 'a
|
F: FnOnce() -> T, F: Send + 'a, T: Send + 'a
|
||||||
{
|
{
|
||||||
|
@ -421,9 +422,7 @@ impl Builder {
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(JoinHandle(JoinInner {
|
Ok(JoinHandle(JoinInner {
|
||||||
native: unsafe {
|
native: Some(imp::Thread::new(stack_size, Box::new(main))?),
|
||||||
Some(imp::Thread::new(stack_size, Box::new(main))?)
|
|
||||||
},
|
|
||||||
thread: my_thread,
|
thread: my_thread,
|
||||||
packet: Packet(my_packet),
|
packet: Packet(my_packet),
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue