Advertisement
Guest User

Untitled

a guest
Dec 7th, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. user=> (def c (async/chan 1 (take 5)))
  2. #'user/c
  3. user=> (dotimes [i 10] (async/go (async/>! c i)))
  4. nil
  5. user=> (async/<!! c)
  6. 8
  7. user=> (async/<!! c)
  8. 2
  9. user=> (async/<!! c)
  10. ClassCastException clojure.lang.PersistentVector cannot be cast to java.util.concurrent.locks.Lock  clojure.core.async.impl.channels.ManyToManyChannel (channels.clj:56)
  11. user=> (async/<!! c)
  12. ClassCastException clojure.lang.PersistentVector cannot be cast to java.util.concurrent.locks.Lock  clojure.core.async.impl.channels.ManyToManyChannel (channels.clj:56)
  13. user=> (async/<!! c)
  14. 9
  15. user=> (async/<!! c)
  16. 6
  17. user=> (async/<!! c)
  18. 5
  19. user=> (async/<!! c)
  20. 7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement