class_docstr: A simple reader-writer lock Several readers can hold the lock
  simultaneously, XOR one writer. Write locks have priority over reads to
  prevent write starvation.
class_docstr_tok: ["A","simple","reader-writer","lock","Several","readers","can","hold","the","lock","simultaneously",",","XOR","one","writer",".","Write","locks","have","priority","over","reads","to","prevent","write","starvation","."]
docstr: Release a lock, whether read or write.
docstr_tok: ["Release","a","lock",",","whether","read","or","write","."]
code: def release(self):
      """
      Release a lock, whether read or write.
      """
      self.monitor.acquire()
      if self.rwlock < 0:
          self.rwlock = 0
      else:
          self.rwlock -= 1
      wake_writers = self.writers_waiting and self.rwlock == 0
      wake_readers = self.writers_waiting == 0
      self.monitor.release()
      if wake_writers:
          self.writers_ok.acquire()
          self.writers_ok.notify()
          self.writers_ok.release()
      elif wake_readers:
          self.readers_ok.acquire()
          self.readers_ok.notifyAll()
          self.readers_ok.release()
  
imports: import threading
label_desc: Use image node_id 4 for calling the RWLock obj's underlying member method code with example usage: obj.release() without return types