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

Method wait

Lib/multiprocessing/synchronize.py:358–368  ·  view source on GitHub ↗
(self, timeout=None)

Source from the content-addressed store, hash-verified

356 self._flag.acquire(False)
357
358 def wait(self, timeout=None):
359 with self._cond:
360 if self._flag.acquire(False):
361 self._flag.release()
362 else:
363 self._cond.wait(timeout)
364
365 if self._flag.acquire(False):
366 self._flag.release()
367 return True
368 return False
369
370 def __repr__(self):
371 set_status = 'set' if self.is_set() else 'unset'

Callers

nothing calls this directly

Calls 2

acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected