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

Quelle  mod.rs   Sprache: unbekannt

 
//! Abstracts out the APIs necessary to `Runtime` for integrating the blocking
//! pool. When the `blocking` feature flag is **not** enabled, these APIs are
//! shells. This isolates the complexity of dealing with conditional
//! compilation.

mod pool;
pub(crate) use pool::{spawn_blocking, BlockingPool, Spawner};

cfg_fs! {
    pub(crate) use pool::spawn_mandatory_blocking;
}

cfg_trace! {
    pub(crate) use pool::Mandatory;
}

mod schedule;
mod shutdown;
mod task;
pub(crate) use task::BlockingTask;

use crate::runtime::Builder;

pub(crate) fn create_blocking_pool(builder: &Builder, thread_cap: usize) -> BlockingPool {
    BlockingPool::new(builder, thread_cap)
}

[ Dauer der Verarbeitung: 0.4 Sekunden  (vorverarbeitet)  ]