我们从Python开源项目中,提取了以下12个代码示例,用于说明如何使用pymongo.errors.ExceededMaxWaiters()。
def acquire(self, blocking=True, timeout=None): if not self.waiter_semaphore.acquire(False): raise ExceededMaxWaiters() try: return self.semaphore.acquire(blocking, timeout) finally: self.waiter_semaphore.release()