Fork me on GitHub
#core-async
<
2020-06-19
>
isak16:06:59

Is this an invalid usage of alt!?

(go
    (let [t1 (timeout 10)
          t2 (timeout 20)]
      (let [v (<! (alt! t1 :t1 t2 :t2))]
        (println "V:" v))))
It throws this error:
Exception in thread "async-dispatch-11" java.lang.IllegalArgumentException: No implementation of method: :take! of protocol: #'clojure.core.async.impl.protocols/ReadPort found for class: clojure.lang.Keyword

isak16:06:04

Oh I see, alt! doesn't return a channel