Skip to main content

build_data_plane_runtime

Function build_data_plane_runtime 

Source
pub fn build_data_plane_runtime(
    label: &'static str,
    worker_threads: usize,
) -> Handle
Expand description

Build a dedicated data-plane runtime on its own OS thread, tagged DataPlane(label), and return a handle for spawning onto it.

The runtime runs on a standalone std::thread rather than a Tokio spawn_blocking thread: a runtime-managed blocking thread is awaited at teardown, so uninterruptible FFI (CUDA, NCCL, ibverbs) running on it would hang shutdown forever. A standalone thread is not awaited. Its worker threads are stamped DataPlane(label) via on_thread_start. The returned Handle stays valid until the runtime (retained in DATA_PLANE_RUNTIMES) is torn down by shutdown_data_plane_runtimes at process teardown.