[Python-Dev] Mutex module

Facundo Batista facundobatista at gmail.com
Sat Feb 23 22:22:37 CET 2008


Hi!

In today's bug day, an Argentinian colleague called my attention over
the issue 1746071.

This issue is about mutex:

"""The mutex module defines a class that allows mutual-exclusion via
acquiring and releasing locks. It does not require (or imply)
threading or multi-tasking, though it could be useful for those
purposes."""

The problem here is that mutex is NOT thread safe! Even when it says
in the docs that it could be useful for threading!

"Ok, let's make this mutex to be thread-safe", I thought, and my
colleague reviewed the proposed patch, even finding and submitting a
correction to it.

But two points prevented me for further work here:

- It has not test cases at all

- It does something that could be easily done (today) using parts from
the threading module.

There're some comments in that issue that points towards a deprecation
of this module.

So, I'm asking here. Is it still working in 3k? What are the plans
here? What do you think about this module? Is somebody using it?

Thank you all! Regards,

[1] http://bugs.python.org/issue1746071
[2] http://docs.python.org/dev/library/mutex.html

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/


More information about the Python-Dev mailing list