pub fn pin_to_core(core_id: usize) -> Result<()>
Pin the calling thread to a specific CPU core.
Returns an error if pinning fails.