I was thinking that killing `P` would be enough, but you're probably right that I should `close(io)` too.   However, this may some rearrangement to avoid calling `close(io)` twice, avoid killing `P` if we throw from `pipeline_error(P)`, and so on.