// A panic is death: the diagnostic goes to the process's stderr FIRST, and the // process then aborts (status 134). Nothing is sent on the breaker - the // process ending is the event every domain inside it shares. package main func worker(go chan int32) (closed chan struct{}) { for { select { case <-closed: return closed case <-go: panic("worker died") } } } func main() { select { case <-shutdown: return default: } g := chan int32{} done := spawn(worker, g) g <- 1 <-done println("main saw the breaker") }