Although this also ties up a thread for every reduce. Not exactly efficient
IMO.

Timothy


On Sun, Aug 25, 2013 at 11:50 PM, Alan Busby <thebu...@gmail.com> wrote:

>
> On Mon, Aug 26, 2013 at 1:37 PM, Timothy Baldridge 
> <tbaldri...@gmail.com>wrote:
>
>> Since reducers use fork-join pools,
>
>
> Reducers use multiple threads and fork-join pools when called with "fold"
> on vectors (anything else?), not "reduce".
> By making the single producer thread of the reducer block on writes, per
> Jozef's code, he's making it act like a lazy-seq.
>
> If fold was used, then something similar to the code snippet I provided
> may be more appropriate.
> It would really depend on the use-case though.
>
> --
> --
> 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/groups/opt_out.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
-- 
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/groups/opt_out.

Reply via email to