hornet.task – Parallel Task Execution

Module for the parallel processing of tasks. Avoids the global interpreter lock, thus allowing a single Python process to take advantage of multiple processors. An optimal use is for plugins that can process several network graphs in parallel.

hornet.task is a leaky wrapper for multiprocessing. If using Python <2.6, it requires pyprocessing.

>>> f = lambda x: x**x
>>> p = Pool()              #doctest: +SKIP
>>> p.map(f, [1, 4, 10])    #doctest: +SKIP
[1, 16, 100]

Module author: John Paulett <john.paulett -at- vanderbilt.edu>

Previous topic

hornet.plot – Graphing Library

Next topic

hornet.util – Hornet Utilities

This Page