In python 3, there is a parallel mapping in concurrent.futures (in the standard library). I think it was even backported as a module for python 2.7. change http://pypi.python.org/pypi/futures
As noted in another answer, threads won't help. Instead, you need to use several processes.
editing from documents looks so simple:
with concurrent.futures.ProcessPoolExecutor() as executor: for result in executor.map(simu, clusterSizes) pass
rplnt source share