Skip to main content

Module threading_functions

Module threading_functions 

Source
Expand description

This module contains a few helper.

For example, you can find a function for determining number of threads available in system. The sleep family of functions are also here.

Re-exports§

pub use crate::threading::thread_primitives::init_runtime;

Constants§

MICROS_PER_SEC
MILLIS_PER_SEC
NANOS_PER_SEC

Functions§

async_sleep
block_on_task
Given a closure task, push it onto the current tokio runtime for execution. Every [DEFAULT_SLEEP_DURATION] seconds, we check if the task has concluded. Once the task has concluded, we call tokio::block_on to resolve and extract the task result.
get_default_system_thread_count
sleep