Completion arity of transducer is called twice

Description

completion arity (1) of a transducer function is called twice in a channel

will print

According to https://clojure.org/reference/transducers, it is probably a bug:

> A completing process must call the completion operation on the final accumulated value exactly once

Looks like completing fn is called at there places in core.async: https://github.com/clojure/core.async/blob/master/src/main/clojure/cljs/core/async/impl/channels.cljs#L122 https://github.com/clojure/core.async/blob/master/src/main/clojure/cljs/core/async/impl/channels.cljs#L146

Environment

None

Activity

Show:

Jan Rychter February 23, 2019 at 5:29 PM

I can confirm that I also encountered this and was surprised by the behavior.

Details

Assignee

Reporter

Priority

Created January 20, 2017 at 7:16 AM
Updated February 23, 2019 at 5:29 PM