use super::*; #[test] fn test_arc_u8_manual_poisoning() { let other_core_id = prepare_on_fixed_core(); let receiver: Access>, Blocking> = Default::default(); let sender: Access>, Blocking> = Arc::clone(&receiver).into(); let handle = thread::spawn(move || { if_provided_set_core_affinity(other_core_id); let _: () = unsafe { sender.edit().unwrap().mark_poisoned() }; }); assert!(receiver.receive().is_err()); assert!(!receiver.edit().unwrap_err().into_inner().has()); await_completion(handle); }