diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-09-14 19:32:27 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-09-14 19:32:27 -0700 |
commit | 4212164e91ba2f49583cf44ad623a29b36db8f77 (patch) | |
tree | 47aefe3c0162f03e0c823b43873356f69c1cd636 /python/gevent/_queue.pxd | |
parent | 6ca20ff7010f2bafc7fefcb8cad982be27a8aeae (diff) | |
download | yt-local-4212164e91ba2f49583cf44ad623a29b36db8f77.tar.lz yt-local-4212164e91ba2f49583cf44ad623a29b36db8f77.tar.xz yt-local-4212164e91ba2f49583cf44ad623a29b36db8f77.zip |
Windows: Use 32-bit distribution of python
Diffstat (limited to 'python/gevent/_queue.pxd')
-rw-r--r-- | python/gevent/_queue.pxd | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/python/gevent/_queue.pxd b/python/gevent/_queue.pxd new file mode 100644 index 0000000..d4d9da7 --- /dev/null +++ b/python/gevent/_queue.pxd @@ -0,0 +1,74 @@ +cimport cython +from gevent.__waiter cimport Waiter +from gevent._event cimport Event + +cdef _heappush +cdef _heappop +cdef _heapify + +@cython.final +cdef _safe_remove(deq, item) + +@cython.final +@cython.internal +cdef class ItemWaiter(Waiter): + cdef readonly item + cdef readonly queue + +cdef class Queue: + cdef __weakref__ + cdef readonly hub + cdef readonly queue + + cdef getters + cdef putters + + cdef _event_unlock + cdef Py_ssize_t _maxsize + + cpdef _get(self) + cpdef _put(self, item) + cpdef _peek(self) + + cpdef Py_ssize_t qsize(self) + cpdef bint empty(self) + cpdef bint full(self) + + cpdef put(self, item, block=*, timeout=*) + cpdef put_nowait(self, item) + + cdef __get_or_peek(self, method, block, timeout) + + cpdef get(self, block=*, timeout=*) + cpdef get_nowait(self) + cpdef peek(self, block=*, timeout=*) + cpdef peek_nowait(self) + + cdef _schedule_unlock(self) + +@cython.final +cdef class UnboundQueue(Queue): + pass + +cdef class PriorityQueue(Queue): + pass + +cdef class LifoQueue(Queue): + pass + +cdef class JoinableQueue(Queue): + cdef Event _cond + cdef readonly int unfinished_tasks + + +cdef class Channel: + cdef __weakref__ + cdef readonly getters + cdef readonly putters + cdef readonly hub + cdef _event_unlock + + cpdef get(self, block=*, timeout=*) + cpdef get_nowait(self) + + cdef _schedule_unlock(self) |