Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  context.rs

  Sprache: Rust
 

use super::{cancellation_queue, RegistrationQueue, Wheel};

/// Local context for the time driver, used when the runtime wants to
/// fire/cancel timers.
pub(cratestruct LocalContext {
    pub(crate) wheel: Wheel,
    pub(crate) registration_queue: RegistrationQueue,
    pub(crate) canc_tx: cancellation_queue::Sender,
    pub(crate) canc_rx: cancellation_queue::Receiver,
}

impl LocalContext {
    pub(cratefn new() -> Self {
        let (canc_tx, canc_rx) = cancellation_queue::new();
        Self {
            wheel: Wheel::new(),
            registration_queue: RegistrationQueue::new(),
            canc_tx,
            canc_rx,
        }
    }
}

pub(crateenum TempLocalContext<'a> {
    /// The runtime is running, we can access it.
    Running {
        registration_queue: &'a mut RegistrationQueue,
        elapsed: u64,
    },
    #[cfg(feature = "rt-multi-thread")]
    /// The runtime is shutting down, no timers can be registered.
    Shutdown,
}

impl<'a> TempLocalContext<'a> {
    pub(cratefn new_running(cx: &'a mut LocalContext) -> Self {
        TempLocalContext::Running {
            registration_queue: &mut cx.registration_queue,
            elapsed: cx.wheel.elapsed(),
        }
    }

    #[cfg(feature = "rt-multi-thread")]
    pub(cratefn new_shutdown() -> Self {
        TempLocalContext::Shutdown
    }
}

Messung V0.5 in Prozent
C=92 H=100 G=95

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002