TBH, I wasn't sure what exactly the question was. I'll assume for the rest of this answer, that by 'opportunities for parallel execution' you mean uses of fold.
So if you're asking how to control the number of threads used for folding: That's a constructor argument of ForkJoinPool, which defaults to the number of available processors. It's not currently exposed in the reducers API, but you could hack it with alter-var-root, if you need to: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core/reducers.clj#L41 As for invoking fold from inside a reducer operation: I'm not that familiar with the implementation yet, but since it's based on ForkJoin, which means recursively splitting the work into lambdas, I suspect that it might just work as expected. See also the implementation of fold for vectors: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core/reducers.clj#L336 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
