Commit 51b7a422 authored by Denis Bilenko's avatar Denis Bilenko

coros.py: rename _Semaphore to PySemaphore

parent c560dae0
...@@ -9,7 +9,7 @@ from gevent.timeout import Timeout ...@@ -9,7 +9,7 @@ from gevent.timeout import Timeout
__all__ = ['Semaphore', 'DummySemaphore', 'BoundedSemaphore', 'RLock'] __all__ = ['Semaphore', 'DummySemaphore', 'BoundedSemaphore', 'RLock']
class _Semaphore(object): class PySemaphore(object):
"""A semaphore manages a counter representing the number of release() calls minus the number of acquire() calls, """A semaphore manages a counter representing the number of release() calls minus the number of acquire() calls,
plus an initial value. The acquire() method blocks if necessary until it can return without making the counter plus an initial value. The acquire() method blocks if necessary until it can return without making the counter
negative. negative.
...@@ -132,7 +132,7 @@ class _Semaphore(object): ...@@ -132,7 +132,7 @@ class _Semaphore(object):
try: try:
from gevent._semaphore import Semaphore from gevent._semaphore import Semaphore
except ImportError: except ImportError:
Semaphore = _Semaphore Semaphore = PySemaphore
class DummySemaphore(object): class DummySemaphore(object):
......
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