gem/openquake — pull request #589 by al-maisan (2011-11-28 15:37:07+00:00)
Title: Prepare to parallelize the serialization of hazard curves

Hello there!

This is the second piece of https://bugs.launchpad.net/openquake/+bug/894398.
For tasks whose results are ignored we now may pass a post-processing function
to utils.tasks.distribute(). It will receive the same parameters as the task
function.

If more parameters are needed (e.g. the realization number in case of
serializing hazard curves the post-processing function can be curried
using functools.partial() before being passed to distribute())

N.B.: the post-processing function is likely to execute in parallel with
longer running tasks.

Please let me know what you think!