question about mutex.py

Kent Johnson kent at kentsjohnson.com
Sat Jan 7 10:23:39 EST 2006


Jean-Paul Calderone wrote:
> Did you read the module docstring?
> 
>    Of course, no multi-threading is implied -- hence the funny interface
>    for lock, where a function is called once the lock is aquired.
> 
> If you are looking for a mutex suitable for multithreaded use, see the 
> threading module.

I have always seen mutexes used in multi-threaded programs. I'm curious, 
what is the usefulness of a non-thread-safe mutex? I'm sure it must be 
good for something, I just can't figure it out.

Thanks,
Kent



More information about the Python-list mailing list