unsafeimpl Send for NSThread {} unsafeimpl Sync for NSThread {}
impl UnwindSafe for NSThread {} impl RefUnwindSafe for NSThread {}
/// Whether the application is multithreaded according to Cocoa. pubfn is_multi_threaded() -> bool {
NSThread::isMultiThreaded()
}
/// Whether the current thread is the main thread. /// /// Deprecated. Prefer `MainThreadMarker::new().is_some()` or /// `NSThread::isMainThread_class()` instead. #[deprecated = "use `objc2::MainThreadMarker::new().is_some()`"] pubfn is_main_thread() -> bool {
MainThreadMarker::new().is_some()
}
#[allow(unused)] fn make_multithreaded() { let thread = unsafe { NSThread::new() }; unsafe { thread.start() }; // Don't bother waiting for it to complete!
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.