MCPcopy Index your code
hub / github.com/python/cpython / release

Method release

Lib/importlib/_bootstrap.py:372–383  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

370 self.wakeup.release()
371
372 def release(self):
373 tid = _thread.get_ident()
374 with self.lock:
375 if self.owner != tid:
376 raise RuntimeError('cannot release un-acquired lock')
377 assert len(self.count) > 0
378 self.count.pop()
379 if not len(self.count):
380 self.owner = None
381 if len(self.waiters) > 0:
382 self.waiters.pop()
383 self.wakeup.release()
384
385 def locked(self):
386 return bool(self.count)

Callers 6

_getresponseMethod · 0.45
pollresponseMethod · 0.45
handle_EOFMethod · 0.45
acquireMethod · 0.45
__exit__Method · 0.45
_lock_unlock_moduleFunction · 0.45

Calls 1

popMethod · 0.45

Tested by

no test coverage detected