Make DummySemaphore.acquire return True

Usually gevent.lock.DummySemaphore and gevent.lock.Semaphore are used interchangeably
and since gevent.lock.Semaphore.acquire return a boolean for checking if acquiring
lock failed or worked, it will make sense to just return True for DummySemaphore.acquire,
this way we can just use afterward ``if not acquired: ...``.
parent 72119c8c
......@@ -32,7 +32,7 @@ class DummySemaphore(object):
pass
def acquire(self, blocking=True, timeout=None):
pass
return True
def __enter__(self):
pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment