pin_current_thread_to_cpu

Function pin_current_thread_to_cpu 

Source
pub fn pin_current_thread_to_cpu(cpu: usize) -> Result<()>
Expand description

Pins the current thread to the given CPU (Linux).

On non-Linux targets this returns an error.

ยงErrors

Returns an error when the requested CPU is out of range, when affinity syscalls fail, or when CPU pinning is not supported on this platform.