Expand description
chan.yield Reachability Lint
Errors when chan.yield is called from a word with no cooperative
peer — i.e. a word that is not reachable from any strand.spawn or
strand.weave. Such a call is a no-op masquerading as concurrency
machinery and almost always indicates a deleted/forgotten spawn.
§Cooperative set
A user word is cooperative iff at least one of the following holds:
- Its body contains a
strand.spawnorstrand.weavecall (the “spawner-self” rule — yielding from the same word that just spawned a peer is canonical). - It appears as a literal-quotation body passed directly to
strand.spawn/strand.weave(the seed roots). - It is transitively called by some cooperative word.
Quotations passed to other combinators (if, when, map, dip,
…) inherit their enclosing word’s classification; we do not try to
track quotations stored in data and later invoked via call. The
design doc accepts that conservatism as a false-positive risk that
has not appeared in practice.