How to compose futures?

2011-09-10 Thread Illim
I'm a clojure beginner and from the future api , the only way I found to create a future from another is to block the resulting future's thread with 'deref'. I'm a little bit afraid of exhausting my thread pool. For example: (def x (future 1)) (def y (future (+ 1 @x))) y will block and consume a th

Re: How to compose futures?

2011-09-11 Thread Illim
the wrong way, seem rude and hard to swallow. > > > >> Using agents when you want a thread pool smacks of ignorance. > > >http://download.oracle.com/javase/6/docs/api/java/util/concurrent/Thr... > > > >> You can tell when you should be using a threadpool/futures ins