`
(def ch (chan 1 (take 2)))
(put! ch 1)
(put! ch 2)
(put! ch 3)
(take! ch identity)
`
ClassCastException clojure.lang.PersistentVector cannot be cast to java.util.concurrent.locks.Lock clojure.core.async.impl.channels_MANY_MANYChannel (channels.clj:55)
如果在第一次put之前进行take以使缓冲区大小合适,则不会出现这种情况。但这似乎不仅仅与缓冲区大小有关。
`
(def ch (chan 1 (take-while true?)))
(put! ch true)
(put! ch false)
(put! ch false)
(take! ch identity)
`
ClassCastException clojure.lang.PersistentVector cannot be cast to java.util.concurrent.locks.Lock clojure.core.async.impl.channels_MANY_MANYChannel (channels.clj:55)