The reliability of python threads
Paul Rubin
http
Wed Jan 24 19:11:07 EST 2007
"Klaas" <mike.klaas at gmail.com> writes:
> POSIX issues aside, Python's threading model should be less susceptible
> to memory-barrier problems that are possible in other languages (this
> is due to the GIL).
But the GIL is not part of Python's threading model; it's just a
particular implementation artifact. Programs that rely on it are
asking for trouble.
> Double-checked locking, frinstance, is safe in python even though it
> isn't in java.
What's that?
> Are you ever relying solely on the GIL to access shared data?
I think a lot of programs do that, which is probably unwise in the
long run.
More information about the Python-list
mailing list