Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/objc2-foundation/src/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 843 B image not shown  

Quelle  thread.rs   Sprache: Rust

 

use core::panic::{RefUnwindSafe, UnwindSafe};

use crate::NSThread;

use objc2::MainThreadMarker;

unsafe impl Send for NSThread {}
unsafe impl Sync for NSThread {}

impl UnwindSafe for NSThread {}
impl RefUnwindSafe for NSThread {}

/// Whether the application is multithreaded according to Cocoa.
pub fn 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()`"]
pub fn 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!
}

Messung V0.5 in Prozent
C=82 H=64 G=73

¤ Dauer der Verarbeitung: 0.8 Sekunden  (vorverarbeitet am  2026-10-01) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.