Roy Smith <[EMAIL PROTECTED]> writes:

> I'm perusing PEP-3108 and came upon this interesting statement (under the 
> "Hardly used" section):
>
> mutex [...] Not thread-safe.
>
> How can a mutex, whose sole reason for existence is to mediate thread 
> safety, not be thread safe?

"mutex" is a module designed for use with "sched", not for
multithreading:

"""Mutual exclusion -- for use with module sched
[...]
Of course, no multi-threading is implied -- hence the funny interface
for lock, where a function is called once the lock is aquired.
"""

What is called a mutex in multithreading is known in Python as
threading.Lock, and does work with threads.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to