> so Java Futures are not the same as Clojure futures then! A 
> Clojure future will fire up as soon as you define it yes? If what you 
> say is true, then Java Future objects are not the same! I was under the 
> impression that as soon as you submit the job and get the Future Object 
> back , the actual computation has started already! I was wrong then... 
>

It's not about futures, but about the way the ExecutorService is 
configured. Clojure's *future-call* apparently uses the *agent send-off pool
*, which is an unbounded thread pool executor. So you can use the same 
thing with *Executors/newCachedThreadPool* or instantiate one directly with 
a constructor, which gives finer-grained control over the behavior.
 

> What if I grew the size of the pool to (count 
> coll) instead of cpu-no? Then there would be no futures waiting for 
> their turn but it could have a bad impact on thread-coordination. 


Yes, the impact could be dreadful, possibly even resulting in *OutOfMemory* and 
the total time of execution would definitely deteriorate. This is not the 
smart way to go.

-- 
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

Reply via email to