title: gevent-compatible reentrant lock?
body: <p>What is the <a href="https://docs.python.org/2/library/threading.html#threading.RLock" rel="nofollow noreferrer">RLock</a> equivalent in gevent? If there is no equivalent, how to identify the current greenlet so I can implement one?</p>
  
  <p>From reading the source, <a href="http://www.gevent.org/gevent.lock.html#gevent.lock.BoundedSemaphore" rel="nofollow noreferrer">gevent.lock.BoundedSemaphore(1)</a> is the equivalent of a simple (non-reentrant) Lock. Testing also indicates this.</p>