Mon Apr 23 15:07:05 CDT 2012
> "store b in global a, for some reason"
> global a
> a = b
> def task_two(c):
> "product of a and c, must be run following task_one"
> return c*a
> rc = parallel.Client()
> view = rc.load_balanced_view()
> # submit task_one anywhere
> ar_one = view.apply_async(task_one, 5)
> # submit task_two to the same engine as task_one (even though we don't
> know where that is, yet)
> with view.temp_flags(follow=ar_one):
> ar_two = view.apply_async(task_two, 10)
this is exactly what i needed. thanks for this.
> We call these Graph Dependencies, and you can read a bit more about them in
> the docs<http://ipython.org/ipython-doc/dev/parallel/parallel_task.html#graph-dependencies>
just read them and they are plenty clear.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev