Add more from the std
This commit is contained in:
@@ -1,7 +1,23 @@
|
||||
pub mod builder;
|
||||
pub mod current;
|
||||
pub mod functions;
|
||||
pub mod id;
|
||||
pub mod join_handle;
|
||||
pub mod lifecycle;
|
||||
pub mod local;
|
||||
pub mod main_thread;
|
||||
pub mod thread;
|
||||
|
||||
pub use crate::sys::thread::*;
|
||||
use core::any::Any;
|
||||
|
||||
pub use crate::sys::thread::yield_now;
|
||||
pub(crate) use current::current_or_unnamed;
|
||||
pub use current::current_id;
|
||||
pub use functions::sleep;
|
||||
pub use id::ThreadId;
|
||||
pub use local::LocalKey;
|
||||
pub use thread::Thread;
|
||||
pub(crate) use lifecycle::ThreadInit;
|
||||
|
||||
// Implementation details used by the thread_local!{} macro.
|
||||
#[doc(hidden)]
|
||||
@@ -11,14 +27,6 @@ pub mod local_impl {
|
||||
pub use crate::sys::thread_local::*;
|
||||
}
|
||||
|
||||
pub struct ThreadInit {
|
||||
pub handle: Thread,
|
||||
pub rust_start: Box<dyn FnOnce() + Send>,
|
||||
}
|
||||
impl ThreadInit {
|
||||
/// Initialize the 'current thread' mechanism on this thread, returning the
|
||||
/// Rust entry point.
|
||||
pub fn init(self: Box<Self>) -> Box<dyn FnOnce() + Send> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[doc(search_unbox)]
|
||||
pub type Result<T> = crate::result::Result<T, Box<dyn Any + Send + 'static>>;
|
||||
|
||||
Reference in New Issue
Block a user