On Mar 2, 2:34 pm, Anand Patil <[email protected]> wrote: > On Mar 2, 12:48 pm, Rich Hickey <[email protected]> wrote: > > On Mar 2, 2009, at 5:15 AM, Anand Patil wrote: > > > On Mar 1, 10:58 pm, Rich Hickey <[email protected]> wrote: > > > If you'll bear with me a bit longer- what if I set breadth=1000 and > > > depth=1000 in the program above. The thread pool would have to grow by > > > thousands to avoid a deadlock, whereas with something like yield it > > > could stay alive using only the standard, fixed-size thread pool. > > > I understand the problem and there is already a solution - it's called > > the Fork/Join framework, and you can use it easily from Clojure: > > >http://www.ibm.com/developerworks/java/library/j-jtp11137.htmlhttp://... > > Good to know- I'll have a look at Fork/Join.
OK, ForkJoin really does solve exactly that problem. Nice. Out of curiosity, what's your vision for how ForkJoin would ideally interoperate with Clojure's own agents and futures? Specifically, would they share a thread pool, and would the availability of ForkJoin actually change the behavior of agents and futures at all? Thanks, Anand --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
