-
-
Save rads/44b0aa0aaa7f46c5761b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns dialog.core | |
(:require [cljs.core.async :as async :refer [<! >! chan timeout]]) | |
(:require-macros [cljs.core.async.macros :refer [go]])) | |
(let [c (chan)] | |
(go (while true | |
(<! c) | |
(.log js/console "take off channel"))) | |
(go (while true | |
(<! (timeout 3000)) | |
(>! c true) | |
(.log js/console "put on channel")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment