diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-07-12 23:40:30 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-07-12 23:41:07 -0700 |
commit | c3b9f8c4582882cd1f768b0727eca75475bb4f94 (patch) | |
tree | 5b4a1c693fd5b7416f1d5a75862e633502e77ca7 /python/gevent/_semaphore.pxd | |
parent | fe9fe8257740529f5880693992e4eeca35c7ea3e (diff) | |
download | yt-local-c3b9f8c4582882cd1f768b0727eca75475bb4f94.tar.lz yt-local-c3b9f8c4582882cd1f768b0727eca75475bb4f94.tar.xz yt-local-c3b9f8c4582882cd1f768b0727eca75475bb4f94.zip |
track embedded python distribution
Diffstat (limited to 'python/gevent/_semaphore.pxd')
-rw-r--r-- | python/gevent/_semaphore.pxd | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/python/gevent/_semaphore.pxd b/python/gevent/_semaphore.pxd new file mode 100644 index 0000000..6382d56 --- /dev/null +++ b/python/gevent/_semaphore.pxd @@ -0,0 +1,23 @@ +cdef class Semaphore: + cdef public int counter + cdef readonly object _links + cdef readonly object _notifier + cdef public int _dirty + cdef object __weakref__ + + cpdef bint locked(self) + cpdef int release(self) except -1000 + cpdef rawlink(self, object callback) + cpdef unlink(self, object callback) + cpdef _start_notify(self) + cpdef _notify_links(self) + cdef _do_wait(self, object timeout) + cpdef int wait(self, object timeout=*) except -1000 + cpdef bint acquire(self, int blocking=*, object timeout=*) except -1000 + cpdef __enter__(self) + cpdef __exit__(self, object t, object v, object tb) + +cdef class BoundedSemaphore(Semaphore): + cdef readonly int _initial_value + + cpdef int release(self) except -1000 |