Re: core.async: Unbound channels

2019-07-11 Thread Ernesto Garcia
Thanks Alex! Correct, the channel implementation takes care that "transduced" channels always pass elements through the transducer and the buffer. Also, a FixedBuffer allows running out of limit for those cases, see this example with a FixedBuffer of size 1 making space for 4 elements: (def c

Re: core.async: Unbound channels

2019-07-08 Thread Alex Miller
Expanding transducers (like mapcat) can produce multiple output values per input value, and those have to have someplace to go. -- 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

Re: core.async: Unbound channels

2019-07-08 Thread Ernesto Garcia
I see. Bufferless channels are meant to be used within the core.async threading architecture, where there will be a limited number of blocked puts and takes. At the boundaries, channels with dropping or sliding windows can be used for limiting work. So, my original question actually turns

Re: core.async: Unbound channels

2019-07-06 Thread Matching Socks
"Effective" is in the eye of the beholder. The 1024 limit helps surface bugs wherein more than a thousand threads are blocked for lack of a certain channel's buffer space. But the 1024 limit does not pertain if 1 thread would like to do thousands of puts for which there is no buffer space.

Re: core.async: Unbound channels

2019-07-05 Thread Ernesto Garcia
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 >

Re: core.async: Unbound channels

2019-07-04 Thread Matching Socks
Ernesto, you may be interested in the informative response to this enhancement request, https://clojure.atlassian.net/browse/ASYNC-23, "Support channel buffers of unlimited size". Anyway, if you do not want to think very hard about buffer size, you can specify a size of 1. It does not limit

Re: core.async: Unbound channels

2019-07-04 Thread Ernesto Garcia
Thanks for your response, it is important to know. (Sorry for my lexical typo: *unbound**ed*. I didn't realize it derives from the verb *bound*, not *bind*!) My question on channel boundaries still holds though. Why the enforcement of boundaries *always*? On Wednesday, July 3, 2019 at 5:16:31

Re: core.async: Unbound channels

2019-07-03 Thread Ghadi Shayban
(chan) is not a channel with an unbounded buffer. It is a channel with *no* buffer and needs to rendezvous putters and takers 1-to-1. (Additionally it will throw an exception if more than 1024 takers or putters are enqueued waiting) On Wednesday, July 3, 2019 at 7:14:46 AM UTC-4, Ernesto

core.async: Unbound channels

2019-07-03 Thread Ernesto Garcia
You can create a unbound channel with (chan), but not if you use a transducer; (chan nil (filter odd?)) will raise an error that no buffer is provided. Why is this the case? Why the enforcement of all channels to be bound? In a program, there will be channels that propagate to other channels,