def trywait(self):
        """Decrement the value of the semaphore if possible."""
        if self._sem_trywait(self.sem_p):
            if self._error().contents.value == EAGAIN:
                return False
            else:
                raise SemError()
        return True
Decrement the value of the semaphore if possible.
recipes/Python/577655_POSIX_Semaphore_FreeBSD/recipe-577655.py