threading.RLock not subclassible?

Aahz Maruch aahz at
Sun Feb 4 12:14:57 EST 2001

In article <3A7D5B5F.AADAA673 at>, John Gault  <gry at> wrote:
>I would like to make a subclass of threading.RLock so I can
>add a 'safe_acquire' method.  Safe_acquire would use non-
>blocking acquires and sleeps over several iterations to try
>to acquire the lock, but would eventually return so my thread
>is not forever blocked.

I think that it would be better for you to just create a brand-new class
that contains an RLock object.  Is there some reason to avoid that?
                      --- Aahz (Copyright 2001 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

"People sometimes focus too much on the fact of communication rather than
the substance of communication."  --Dave Morton

More information about the Python-list mailing list