[Python-Dev] Pythonic concurrency (original) (raw)

Donovan Baarda abo at minkirri.apana.org.au
Mon Oct 10 16:45:33 CEST 2005


On Fri, 2005-10-07 at 23:54, Nick Coghlan wrote: [...]

The few times I have encountered anyone saying anything resembling "threading is easy", it was because the full sentence went something like "threading is easy if you use message passing and copy-on-send or release-reference-on-send to communicate between threads, and limit the shared data structures to those required to support the messaging infrastructure". And most of the time there was an implied "compared to using semaphores and locks directly, " at the start.

LOL! So threading is easy if you restrict inter-thread communication to message passing... and what makes multi-processing hard is your only inter-process communication mechanism is message passing :-)

Sounds like yet another reason to avoid threading and use processes instead... effort spent on threading based message passing implementations could instead be spent on inter-process messaging.

-- Donovan Baarda <abo at minkirri.apana.org.au>



More information about the Python-Dev mailing list