On Thursday, July 4, 2019 at 4:24:33 PM UTC+2, Matching Socks wrote:
>
> Ernesto, you may be interested in the informative response to this 
> enhancement request, https://clojure.atlassian.net/browse/ASYNC-23 
> <https://www.google.com/url?q=https%3A%2F%2Fclojure.atlassian.net%2Fbrowse%2FASYNC-23&sa=D&sntz=1&usg=AFQjCNFJwqBcw9W2A33upQvqzVFav89ksw>,
>  
> "Support channel buffers of unlimited size".
>

An example: Here a function that makes a request, and returns a channel 
with responses with the same referenceId as the request. The function taps 
a mult-channel, but I don't now what buffer to use.I would expect that the 
original mult-channel already implements some buffering limits.

(defn request [client events-mult-channel req]
  (let [ref-id (.getReference req)
        result-channel (chan 16 (filter #(= ref-id (.getReference %))))]
    (tap events-mult-channel result-channel)
    (.send client req)
    result-channel))

 

> Anyway, if you do not want to think very hard about buffer size, you can 
> specify a size of 1.  It does not limit the number of items the producer 
> may put on the channel, but it affects how soon (and how often) the 
> producer's puts must wait for a consumer.
>

I see, puts start to block when the buffer is full or when no buffer. Isn't 
the 1024-limit on blocked puts an effective limit, like a buffer size?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/205bb066-7014-41ec-b552-153b1331143c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to