aleph

pbaille 2019-10-04T08:37:00.020800Z

Hello! question: how can I achieve this with manifold?

(async/go-loop []
  (async/<! (async/timeout 1000))
  (println "tic")
  (recur))

valerauko 2019-10-04T08:44:00.021200Z

deferred/loop and deferred/let-flow should work i think

pbaille 2019-10-04T08:44:34.021800Z

in my little experience deferred/loop blocks

pbaille 2019-10-04T08:44:42.022100Z

I must missing something 🙂

pbaille 2019-10-04T08:45:16.022500Z

is there an analog manifold construct for async/timeout?

valerauko 2019-10-04T08:45:56.022800Z

there's deferred/timeout

valerauko 2019-10-04T08:47:27.023100Z

manifold.stream/consume might be similar too

pbaille 2019-10-04T08:56:58.023700Z

@vale thank you for your help 🙂

👍 1
mccraigmccraig 2019-10-04T09:45:18.024200Z

@pbaille cheesy, but

(defn tics [n] (d/chain (d/timeout! (d/deferred) n ::timeout) (fn [_] (prn "tic") (tics n))))

pbaille 2019-10-04T09:46:54.025100Z

🙂 thank you!