_semaphore.pxd 757 B

1234567891011121314151617181920212223
  1. cdef class Semaphore:
  2. cdef public int counter
  3. cdef readonly object _links
  4. cdef readonly object _notifier
  5. cdef public int _dirty
  6. cdef object __weakref__
  7. cpdef bint locked(self)
  8. cpdef int release(self) except -1000
  9. cpdef rawlink(self, object callback)
  10. cpdef unlink(self, object callback)
  11. cpdef _start_notify(self)
  12. cpdef _notify_links(self)
  13. cdef _do_wait(self, object timeout)
  14. cpdef int wait(self, object timeout=*) except -1000
  15. cpdef bint acquire(self, int blocking=*, object timeout=*) except -1000
  16. cpdef __enter__(self)
  17. cpdef __exit__(self, object t, object v, object tb)
  18. cdef class BoundedSemaphore(Semaphore):
  19. cdef readonly int _initial_value
  20. cpdef int release(self) except -1000