I am experimenting with core.async's mixes. It seems that muting an input channel in a mix would be one of possible ways of implementing backpressure. I am using the code below:
(def output-chan (chan))
(def input-chan (chan))
(def mixer (admix (mix output-chan) input-chan))
(toggle mixer {input-chan {:mute true}})
Evaluating last line in the REPL gives
CompilerException java.lang.IllegalArgumentException: No implementation of method: :toggle* of protocol: #'clojure.core.async/Mix found for class: java.lang.Boolean
.
What is wrong with the above example code?
Thanks!