# mod.rs - source
Source of the Rust file `maplibre/src/platform/noweb/mod.rs`.
Keywords: rust, rustlang, rust-lang

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20

    //! Module which is used target platform is not web related.

    use std::future::Future;

    pub mod http_client;
    pub mod schedule_method;

    pub fn run_multithreaded<F: Future>(future: F) -> F::Output {
        tokio::runtime::Builder::new_multi_thread()
            .worker_threads(4)
            .enable_io()
            .enable_time()
            .on_thread_start(|| {
                #[cfg(feature = "trace")]
                tracy_client::set_thread_name("tokio-runtime-worker");
            })
            .build()
            .unwrap()
            .block_on(future)
    }