You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to create a channel then put! new times into it, like so:
(defchimes (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__37328
But 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).
The text was updated successfully, but these errors were encountered:
Hey @aneilbaboo - thanks for getting in touch. At the moment we assume that the list of times is immutable, so there's no way to modify it after the initial call. Depending on how often you need to do this, you might consider cancelling the scheduler and restarting with a modified sequence of times?
On Thu, Nov 26, 2020 at 1:58 AM James Henderson ***@***.***> wrote:
Hey @aneilbaboo <https://github.com/aneilbaboo> - thanks for getting in
touch. At the moment we assume that the list of times is immutable, so
there's no way to modify it after the initial call. Depending on how often
you need to do this, you might consider cancelling the scheduler and
restarting with a modified sequence of times?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATY7U27H3GFPGC65KXBZE3SRYREBANCNFSM4TV3FHYA>
.
I'd like to create a channel then
put!
new times into it, like so:But perhaps there is a way to do this already? (I tried passing a channel to the
ch
param ofchimes-ch
and putting times into it, but that didn't work either).The text was updated successfully, but these errors were encountered: