Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRustRc and ArcSingle-choice MCQ

You build `Arc::new(Cell::new(0))` and try to move a clone into `thread::spawn`. The compiler rejects it. What is the precise reason?

use std::sync::Arc; use std::cell::Cell; let a = Arc::new(Cell::new(0)); let b = Arc::clone(&a); std::thread::spawn(move || { b.set(1); });