-
Notifications
You must be signed in to change notification settings - Fork 39
Feature request: Allow adding new times to a chimes-ch channel #39
Copy link
Copy link
Open
Labels
Description
I'd like to create a channel then put! new times into it, like so:
(def chimes (chimes-ch []))
(a/<!! (go-loop []
(when-let [msg (<! chimes)]
(prn "Chiming at:" msg)
(recur))))
(put! [(.plusSeconds (Instant/now) 3) (.plusSeconds (Instant/now) 5)])
;; currently, I get:
;; Execution error (IllegalArgumentException) at clojure.core.async.impl.protocols/eval2088$fn$G (protocols.clj:18).
;; No implementation of method: :put! of protocol: #'clojure.core.async.impl.protocols/WritePort found for class: chime.core_async$chime_ch$reify__37328But perhaps there is a way to do this already? (I tried passing a channel to the ch param of chimes-ch and putting times into it, but that didn't work either).
Reactions are currently unavailable