def wait(self, timeout=None, no_eintr=True):
        """Increment the value of the semaphore, wait up to timeout or wait
        indefinitly."""
        if timeout:
            return self.timedwait(timeout, no_eintr)
        while True:
            if self._sem_wait(self.sem_p):
                if not no_eintr or self._error().contents.value != EINTR:
                    raise SemError()
            else:
                return
Increment the value of the semaphore, wait up to timeout or wait
        indefinitly.
recipes/Python/577655_POSIX_Semaphore_FreeBSD/recipe-577655.py