// One pair, one child: passing the same Edge to two spawn calls would give two // domains the same handles (docs/memory-model.md section 4, D19 rule 4). // // expected: already passed to spawn package main type Req struct { Body []byte `cap:"1024"` } func worker(ep Edge[Req, int32]) (closed chan struct{}) { for { select { case <-closed: return closed case r := <-ep.Recv: _ = r } } } func main() { select { case <-shutdown: return default: } parent, child := edge[int32, Req]{2} a := spawn(worker, child) b := spawn(worker, child) close(parent.Send) <-a <-b }