Slug: design-sched-01 · Paired reading: Chapter 27
Prompt
fn spawn_job<F>(f: F) -> JoinHandle<()> where
F: FnOnce() + Send + 'static — thread::spawn wrapper. Document why
Send + 'static: the closure may outlive the caller and run elsewhere.
The curriculum, drills, tutor, and interviewer mode are for readers of Ace the Rust Interview. The code is printed in the Preface (Companion site access).
Don’t have the book yet? The landing page stays open — purchase unlocks this gym.
advanced · order 173
Slug: design-sched-01 · Paired reading: Chapter 27
fn spawn_job<F>(f: F) -> JoinHandle<()> where
F: FnOnce() + Send + 'static — thread::spawn wrapper. Document why
Send + 'static: the closure may outlive the caller and run elsewhere.