Hi folks,

It's been a while since I've used core.async. Documentation suggests that

(chan n)

where n is a number creates a fixed size channel buffer supporting n
elements.

The below clj repl session seems to indicate that I can put 4 items into a
3-sized buffer:

user=> (def c (async/chan 3))
#'user/c
user=> (async/>!! c :a)
true
user=> (async/>!! c :b)
true
user=> (async/>!! c :c)
true
user=> (async/>!! c :d)
;; correctly blocks, ctrl-c to break
user=> (async/<!! c)
:a
user=> (async/<!! c)
:b
user=> (async/<!! c)
:c
;; why do i get :d ? shouldn't it block?
user=> (async/<!! c)
:d

This is with:

[org.clojure/core.async "0.4.474"]

Thanks,

Jonah

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to