(chan 0) is invalid (and is not the same thing as an unbuffered (chan)).
Approach: Add an assertion to throw on (chan 0). I found based on some failing tests that one place this can come up is in to-chan, which creates a buffer sized to the collection (0). The patch also changes to-chan to return an empty, closed chan if the collection is of size 0.
(chan 0) is invalid (and is not the same thing as an unbuffered (chan)).
Approach: Add an assertion to throw on (chan 0). I found based on some failing tests that one place this can come up is in to-chan, which creates a buffer sized to the collection (0). The patch also changes to-chan to return an empty, closed chan if the collection is of size 0.
Patch: async-143.patch