Re: Parallel activities

2010-01-22 Thread tsuraan
> As a major convenience over starting separate threads by hand I would > use "future". For each invocation future will run a given function on > a different thread. You can then either dereference each future which > will block until the function completes or ask if a future has > completed with "

Re: Parallel activities

2010-01-22 Thread tsuraan
> When you send-off an action to an agent, that agent gets is > allocated a thread for at least the duration of that action. So > using send-off on long-running actions to two agents will result > in those actions being run in parallel. Ok, I re-read the docs on agents, and it looks like they don

Re: Parallel activities

2010-01-22 Thread Alex Stoddard
On Jan 21, 10:35 pm, tsuraan wrote: > What is the clojure idiom for running multiple (in this case IO bound) > functions simultaneously?  My use case is the parallel activities are > coordinated, basically running in lockstep.  I've been using (.start > (Thread. myfn)).  

Re: Parallel activities

2010-01-22 Thread Chouser
On Thu, Jan 21, 2010 at 11:35 PM, tsuraan wrote: > What is the clojure idiom for running multiple (in this case IO bound) > functions simultaneously?  My use case is the parallel activities are > coordinated, basically running in lockstep.  I've been using (.start > (Thread.

Parallel activities

2010-01-21 Thread tsuraan
What is the clojure idiom for running multiple (in this case IO bound) functions simultaneously? My use case is the parallel activities are coordinated, basically running in lockstep. I've been using (.start (Thread. myfn)). It works, but I'm wondering if there's a better way.