threading
Roy Smith
roy at panix.com
Sun Apr 6 23:48:46 EDT 2014
In article <mailman.8969.1396839923.18130.python-list at python.org>,
Ben Finney <ben+python at benfinney.id.au> wrote:
> The *whole point* of threading (AFAIK) is to share memory and other
> process-distinct resources.
There is (or at least, was) another reason. Creating a new process used
to be far more expensive than creating a new thread. In modern Unix
kernels, however, the cost difference has become much less, so this is
no longer a major issue.
I agree wholeheartedly with Ben when he says:
> Parallel processing is achieved much more reliably and deterministically
> with separate processes.
Threading makes it incredibly difficult to reason about program
execution. It's not just that things happen asynchronously, the control
flow changes happen at arbitrary times.
More information about the Python-list
mailing list