Threads vs. processes, what to consider in choosing ?

Christian Heimes lists at cheimes.de
Tue Feb 17 12:58:35 EST 2009


Philip Semanchuk wrote:
> The general rule is that it is a lot easier to share data between
> threads than between processes. The multiprocessing library makes the
> latter easier but is only part of the standard library in Python >= 2.6.
> The design of your application matters a lot. For instance, will the
> processing code write its results to a database, ping the GUI code and
> then exit, allowing the GUI to read the database? That sounds like an
> excellent setup for processes.

A backport for Python 2.4 and 2.5 is available on pypi. Python 2.5.4 is
recommended though.

Christian




More information about the Python-list mailing list