Writing on a closed channel doesn't commit the handler



my analysis is that when a write is attempted on a closed channel the handler should be commited, so as to allow cleanup of the handler registrations on other channels.

See https://github.com/clojure/core.async/blob/822920a45e5ea7fa28641922559fdeb888c15d05/src/main/clojure/clojure/core/async/impl/channels.clj#L74-L75




June 7, 2018, 3:47 PM

Comment made by: tdg5

Thanks for documenting and offering a patch for this defect, Christophe!

Is there something blocking further action on this defect/patch? Is there anything I can do to help move a fix forward?

I can confirm the existence of this defect and that the attached patch remedies the problem. I can also confirm that all tests pass with the attached patch applied to the latest revision of core.async (https://github.com/clojure/core.async/commit/196f87dc21f55f601c867b796a0a421550b43c8f).

In the system I encountered this bug on, the actual root problem was that the channel being put to was being closed prematurely. In fact, if this bug didn't exist, my team probably wouldn't have noticed the put channel being closed prematurely (in fact, we didn't notice for months until the right circumstances arose). Perhaps obscuring such problems is part of the reason the suggested patch hasn't been accepted?

Any suggestions for actionable next steps are appreciated.

Christophe Grand
September 21, 2017, 3:04 PM

Attached patch

Your pinned fields
Click on the next to a field label to start pinning.




Christophe Grand


Code and Test