Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/tokio/tests/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 434 B image not shown  

Quelle  signal_usr1.rs   Sprache: unbekannt

 
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]
#![cfg(unix)]

mod support {
    pub mod signal;
}
use support::signal::send_signal;

use tokio::signal::unix::{signal, SignalKind};
use tokio_test::assert_ok;

#[tokio::test]
async fn signal_usr1() {
    let mut signal = assert_ok!(
        signal(SignalKind::user_defined1()),
        "failed to create signal"
    );

    send_signal(libc::SIGUSR1);

    signal.recv().await;
}

[ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet)  ]