// ROOT-level parked parent: the root spawns and then immediately parks in a // receive that only the child can wake. If the child's startup needed the // parent's event loop, this is a deadlock; on wasm the page starts the domain, // so the parent may be parked. The intermediate shape (a spawned domain that // spawns and then parks) is spawn_parked_intermediate.mx. package main func b(c chan int32) (closed chan struct{}) { select { case <-closed: return closed default: } c <- 7 return closed } func main() { select { case <-shutdown: return default: } c := chan int32{:1} done := spawn(b, c) v := <-c println("root got", v) <-done println("done") }