> Is there a way to find out from the API if a given thread (via its > PyThreadState structure) has the interpreter lock already? No; Python's internal lock data structures don't record the owning thread. --Guido van Rossum (home page: http://www.python.org/~guido/)