MCPcopy Create free account
hub / github.com/ActiveState/code / wait

Method wait

recipes/Python/577655_POSIX_Semaphore_FreeBSD/recipe-577655.py:170–180  ·  view source on GitHub ↗

Increment the value of the semaphore, wait up to timeout or wait indefinitly.

(self, timeout=None, no_eintr=True)

Source from the content-addressed store, hash-verified

168 raise SemError()
169
170 def wait(self, timeout=None, no_eintr=True):
171 """Increment the value of the semaphore, wait up to timeout or wait
172 indefinitly."""
173 if timeout:
174 return self.timedwait(timeout, no_eintr)
175 while True:
176 if self._sem_wait(self.sem_p):
177 if not no_eintr or self._error().contents.value != EINTR:
178 raise SemError()
179 else:
180 return

Callers 15

__enter__Method · 0.95
acquireMethod · 0.95
recipe-577013.jsFile · 0.45
recipe-578537.jsFile · 0.45
acquireReadMethod · 0.45
acquireWriteMethod · 0.45
playmusic2Function · 0.45
startupMethod · 0.45
stopMethod · 0.45
getCommandOutputFunction · 0.45
feedMethod · 0.45
do_osx_installFunction · 0.45

Calls 3

timedwaitMethod · 0.95
SemErrorClass · 0.85
_errorMethod · 0.80

Tested by

no test coverage detected