usestd::{cell::Cell,ptr::NonNull};usedope_sys::thread;pubstructCompleted(pub Cell<bool>);// SAFETY: the test retains this context at a stable address and grants only the
// worker access to the cell until native joining returns ownership to the test.
unsafeimplthread::raw::Task forCompleted{unsafefnrun(context:NonNull<Self>){// SAFETY: spawn admits this initialized context for this sole execution.
unsafe{ context.as_ref()}.0.set(true);}}