kithara-platform 0.0.1-alpha1

Platform-aware primitives (sync, traits, time) for native and wasm32 targets
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Ensure the platform task pool is initialized before browser-side tests run.
///
/// On wasm32 this eagerly touches the blocking task backend once so browser
/// tests do not pay lazy worker-pool setup in the measured path.
#[inline]
pub async fn ensure_thread_pool() {
    #[cfg(target_arch = "wasm32")]
    {
        let _ = super::task::spawn_blocking(|| {}).await;
    }
}