Created
May 15, 2014 16:58
-
-
Save loganlinn/e840139a9ab5503970fd to your computer and use it in GitHub Desktop.
Demonstrates behavior of mult bug
This file contains hidden or 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
(deftest ops-test | |
(testing "mult with closed tap" | |
(go | |
(let [a (chan 4) | |
b (chan 4) | |
src (chan 1) | |
m (async/mult src)] | |
(async/tap m a) | |
(async/tap m b) | |
(async/close! a) | |
(async/pipe (async/to-chan (range 4)) src) | |
(.log js/console "a=" (clj->js (<! (async/into [] a)))) | |
(.log js/console "b=" (clj->js (<! (async/into [] b)))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Patch:
Before patch:
After patch: