On Saturday, January 6, 2018 at 10:27:20 AM UTC-6, Rob Nikander wrote:
>
>
> On Jan 5, 2018, at 8:01 PM, Gary Verhaegen <gary.ve...@gmail.com> wrote:
>
>> What about simply having the producer put items one by one on the channel?
>
>
> I will do that. My current producer is doing too many other things, but if 
> I break it up into separate threads or go blocks for each work queue, then 
> that should work. Thank you.
>  
>
> On Saturday, January 6, 2018 at 8:22:34 AM UTC-5, Brian J. Rubinton wrote:
>>
>> I think the behavior in our examples differ because the blocking puts 
>> will complete whenever there is a take and the buffer is not full, ignoring 
>> whether the transducer is still outputting values. This bug may be 
>> relevant, though there it arises in a less common scenario (fixed buffer of 
>> size 0, which is now disallowed) 
>> https://dev.clojure.org/jira/browse/ASYNC-140 
>> <https://www.google.com/url?q=https%3A%2F%2Fdev.clojure.org%2Fjira%2Fbrowse%2FASYNC-140&sa=D&sntz=1&usg=AFQjCNE8iUd6leBDWTq5mesMFvpziQvA3w>
>>
>
> So, should I report this as a bug? If you have channel with a buffer and a 
> (mapcat identity) transducer, the number of items in the channel can grow 
> without bound. I thought channels were supposed to prevent that.
>

This is by design. Because the transducer executes in the channel, it's 
possible for it to temporarily expand the buffer beyond its normal size. 
This is certainly something to be aware of when using an expanding 
transducer (mapcat is probably the most common case).

-- 
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