The reliability of python threads

Nick Maclaren nmm1 at cus.cam.ac.uk
Wed Jan 24 13:21:38 EST 2007


In article <mailman.3095.1169659417.32031.python-list at python.org>,
"Chris Mellon" <arkanes at gmail.com> writes:
|> > |>
|> > |> Does anyone have any conclusive evidence that python threads/locks are
|> > |> safe or unsafe?
|> >
|> > Unsafe.  They are built on top of unsafe primitives (POSIX, Microsoft
|> > etc.)  Python will shield you from some problems, but not all.
|> >
|> > There is precious little that you can do, because the root cause is
|> > that the standards and specifications are hopelessly flawed.
|> 
|> This is sufficiently inaccurate that I would call it FUD. Using
|> threads from Python, as from any other language, requires knowledge of
|> the tradeoffs and limitations of threading, but claiming that their
|> usage is *inherently* unsafe isn't true. It is almost certain that
|> your code and locking are flawed, not that the threads underneath you
|> are buggy.

I suggest that you find out rather more about the ill-definition of
POSIX threading memory model, to name one of the better documented
aspects.  A Web search should provide you with more information on
the ghastly mess than any sane person wants to know.

And that is only one of many aspects :-(


Regards,
Nick Maclaren.



More information about the Python-list mailing list