Christopher Ochsenreither on 4 Jul 2013 12:37:17 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] multiprocessing on Python

Someone at the PLUG central meeting was asking about distributing a Python process over multiple cores. I thought this article might be of interest:

"For many workloads for which the GIL is a bottleneck, one need look no further than the Python standard library. The multiprocessing package trades threads for processes, to great effect. The idea is simple: if a single instance of the Python interpreter is constrained by the GIL, one can achieve gains in concurrent workloads by through multiple interpreter processes in place of multiple threads. Helpfully, multiprocessing was written with the same interface as the threading package, so code already using threads doesn't require a massive rewrite to make use of multiple processes."

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --