On Mar 2, 12:48 pm, Rich Hickey <richhic...@gmail.com> wrote:
> On Mar 2, 2009, at 5:15 AM, Anand Patil wrote:
>
>
> > On Mar 1, 10:58 pm, Rich Hickey <richhic...@gmail.com> wrote:
> >> On Mar 1, 2009, at 1:53 PM, Anand Patil wrote:
> >> I've made futures use the Agents' CachedThreadPool, which should
> >> prevent the thread pool exhaustion (svn 1316). You shouldn't worry
> >> about the expense of the threads, that's why there's a pool.
>
> >> Yield as you've described it is definitely not going to happen.
>
> > Rich,
>
> > 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://gee.cs.oswego.edu/dl/concurrency-interest/index.html
Good to know- I'll have a look at Fork/Join.
Thanks,
Anand
--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---