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
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.html
http://gee.cs.oswego.edu/dl/concurrency-interest/index.html
I'm not going to reinvent that.
There are some wrappers for ParallelArray in clojure.parallel.
Unfortunately it seems like ParallelArray is not going to make it into
Java 7 (although it is still available in 'extra').
jsr166y only targets only Java 1.6+. It seems like the API is
stabilizing though, and might be a good time to look at wrapping more
of Fork/Join for use with Clojure (volunteers welcome).
Rich