Code example for ReentrantLock

Methods: isHeldByCurrentThreadunlock

0
        return this;
    } 
 
    @ExposedMethod 
    final void Lock_release() { 
        if (!_lock.isHeldByCurrentThread()) {
            throw Py.AssertionError("release() of un-acquire()d lock"); 
        } 
        _lock.unlock();
    } 
 
    public void release() { 
        Lock_release(); 
    } 
 
    @ExposedMethod 
    final boolean Lock___exit__(PyObject type, PyObject value, PyObject traceback) {
        _lock.unlock();
        return false; 
    }