Check out the implementation of multi.jl:pmap (the part in the @sync and 
@async blocks), it's a great example.

--Tim

On Thursday, July 17, 2014 04:23:48 PM Elliot Saba wrote:
> I was reading the docs
> <http://julia.readthedocs.org/en/latest/manual/control-flow/#tasks-and-event
> s>, and it seems to me that it's saying I can use tasks to run multiple
> subprocesses at once.  E.g., if I have some long-running subprocesses such
> as `sleep 10`, I should be able to wrap each in a Task and use the inherent
> wait() command that running each subprocess would entail to switch to
> another task and kick off another subprocess.  Is this correct?  If it is,
> can someone provide me a quick example?  I can't seem to get this to work,
> but I've never used Tasks before so that's hardly surprising.  ;)
> -E

Reply via email to