/* Generated by Cython 3.0a5 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "src/gevent/_gevent_cqueue.pxd"
        ],
        "include_dirs": [
            "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8",
            "/Users/jmadden/Projects/VirtualEnvs/gevent38/include/python3.8",
            "/private/var/folders/y5/x7pvzk651c3dqkllbxd1jd280000gn/T/gevent-20.5.2-ik_8m6iw/gitclone/deps"
        ],
        "name": "gevent._gevent_cqueue",
        "sources": [
            "src/gevent/queue.py"
        ]
    },
    "module_name": "gevent._gevent_cqueue"
}
END: Cython Metadata */

#define PY_SSIZE_T_CLEAN
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#define CYTHON_ABI "3_0a5"
#define CYTHON_HEX_VERSION 0x030000A5
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP487_INIT_SUBCLASS
  #define CYTHON_PEP487_INIT_SUBCLASS 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#elif defined(CYTHON_LIMITED_API)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030800B2
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#elif PY_VERSION_HEX >= 0x030800A4
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS(n)
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((n) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  (n)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static inline void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #if defined(_PyType_Name)
    #define __Pyx_PyType_Name(tp)     (_PyType_Name((PyTypeObject *)tp))
  #else
    #define __Pyx_PyType_Name(tp)     (((PyTypeObject *)tp)->tp_name)
  #endif
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
#else
  #define __Pyx_PyType_Name(tp)       (((PyTypeObject *)tp)->tp_name)
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__gevent___gevent_cqueue
#define __PYX_HAVE_API__gevent___gevent_cqueue
/* Early includes */
#include "greenlet/greenlet.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u)
{
    const wchar_t *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

#if !CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char *__pyx_f[] = {
  "src/gevent/queue.py",
  "src/gevent/_gevent_cqueue.pxd",
  "src/gevent/_gevent_c_greenlet_primitives.pxd",
  "src/gevent/_gevent_c_waiter.pxd",
  "src/gevent/_gevent_c_abstract_linkable.pxd",
  "src/gevent/_gevent_cevent.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet;
struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop;
struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter;
struct __pyx_obj_6gevent_16_gevent_c_waiter_MultipleWaiter;
struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable;
struct __pyx_obj_6gevent_14_gevent_cevent_Event;
struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult;
struct __pyx_obj_6gevent_14_gevent_cqueue_Queue;
struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter;
struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue;
struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue;
struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue;
struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue;
struct __pyx_obj_6gevent_14_gevent_cqueue_Channel;
struct __pyx_opt_args_6gevent_27_gevent_c_abstract_linkable_16AbstractLinkable__wait_core;
struct __pyx_opt_args_6gevent_27_gevent_c_abstract_linkable_16AbstractLinkable__wait;

/* "gevent/_gevent_c_abstract_linkable.pxd":65
 *    cpdef _acquire_lock_for_switch_in(self)
 * 
 *    cdef _wait_core(self, timeout, catch=*)             # <<<<<<<<<<<<<<
 *    cdef _wait_return_value(self, waited, wait_success)
 *    cdef _wait(self, timeout=*)
 */
struct __pyx_opt_args_6gevent_27_gevent_c_abstract_linkable_16AbstractLinkable__wait_core {
  int __pyx_n;
  PyObject *catch;
};

/* "gevent/_gevent_c_abstract_linkable.pxd":67
 *    cdef _wait_core(self, timeout, catch=*)
 *    cdef _wait_return_value(self, waited, wait_success)
 *    cdef _wait(self, timeout=*)             # <<<<<<<<<<<<<<
 */
struct __pyx_opt_args_6gevent_27_gevent_c_abstract_linkable_16AbstractLinkable__wait {
  int __pyx_n;
  PyObject *timeout;
};
struct __pyx_opt_args_6gevent_14_gevent_cevent_11AsyncResult_get;
struct __pyx_opt_args_6gevent_14_gevent_cevent_11AsyncResult_wait;

/* "gevent/_gevent_cevent.pxd":23
 *     cdef public int _imap_task_index
 * 
 *     cpdef get(self, block=*, timeout=*)             # <<<<<<<<<<<<<<
 *     cpdef bint successful(self)
 * 
 */
struct __pyx_opt_args_6gevent_14_gevent_cevent_11AsyncResult_get {
  int __pyx_n;
  PyObject *block;
  PyObject *timeout;
};

/* "gevent/_gevent_cevent.pxd":26
 *     cpdef bint successful(self)
 * 
 *     cpdef wait(self, timeout=*)             # <<<<<<<<<<<<<<
 *     cpdef bint done(self)
 * 
 */
struct __pyx_opt_args_6gevent_14_gevent_cevent_11AsyncResult_wait {
  int __pyx_n;
  PyObject *timeout;
};
struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue;
struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put;
struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_get;
struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_peek;
struct __pyx_opt_args_6gevent_14_gevent_cqueue_7Channel_get;
struct __pyx_opt_args_6gevent_14_gevent_cqueue_12UnboundQueue_put;
struct __pyx_opt_args_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue;
struct __pyx_opt_args_6gevent_14_gevent_cqueue_9LifoQueue__create_queue;

/* "gevent/_gevent_cqueue.pxd":57
 *     cpdef bint empty(self)
 *     cpdef bint full(self)
 *     cpdef _create_queue(self, items=*)             # <<<<<<<<<<<<<<
 * 
 *     cpdef put(self, item, block=*, timeout=*)
 */
struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue {
  int __pyx_n;
  PyObject *items;
};

/* "gevent/_gevent_cqueue.pxd":59
 *     cpdef _create_queue(self, items=*)
 * 
 *     cpdef put(self, item, block=*, timeout=*)             # <<<<<<<<<<<<<<
 *     cpdef put_nowait(self, item)
 * 
 */
struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put {
  int __pyx_n;
  PyObject *block;
  PyObject *timeout;
};

/* "gevent/_gevent_cqueue.pxd":64
 *     cdef __get_or_peek(self, method, block, timeout)
 * 
 *     cpdef get(self, block=*, timeout=*)             # <<<<<<<<<<<<<<
 *     cpdef get_nowait(self)
 *     cpdef peek(self, block=*, timeout=*)
 */
struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_get {
  int __pyx_n;
  PyObject *block;
  PyObject *timeout;
};

/* "gevent/_gevent_cqueue.pxd":66
 *     cpdef get(self, block=*, timeout=*)
 *     cpdef get_nowait(self)
 *     cpdef peek(self, block=*, timeout=*)             # <<<<<<<<<<<<<<
 *     cpdef peek_nowait(self)
 * 
 */
struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_peek {
  int __pyx_n;
  PyObject *block;
  PyObject *timeout;
};

/* "gevent/_gevent_cqueue.pxd":100
 *     cdef _event_unlock
 * 
 *     cpdef get(self, block=*, timeout=*)             # <<<<<<<<<<<<<<
 *     cpdef get_nowait(self)
 * 
 */
struct __pyx_opt_args_6gevent_14_gevent_cqueue_7Channel_get {
  int __pyx_n;
  PyObject *block;
  PyObject *timeout;
};

/* "src/gevent/queue.py":431
 *         self.putters = None # Will never be used.
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         self._put(item)
 *         if self.getters:
 */
struct __pyx_opt_args_6gevent_14_gevent_cqueue_12UnboundQueue_put {
  int __pyx_n;
  PyObject *block;
  PyObject *timeout;
};

/* "src/gevent/queue.py":450
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         q = list(items)
 *         _heapify(q)
 */
struct __pyx_opt_args_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue {
  int __pyx_n;
  PyObject *items;
};

/* "src/gevent/queue.py":467
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return list(items)
 * 
 */
struct __pyx_opt_args_6gevent_14_gevent_cqueue_9LifoQueue__create_queue {
  int __pyx_n;
  PyObject *items;
};

/* "gevent/_gevent_c_greenlet_primitives.pxd":37
 *     return PyGreenlet_Switch(self, NULL, NULL)
 * 
 * cdef class TrackedRawGreenlet(greenlet):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet {
  PyGreenlet __pyx_base;
};


/* "gevent/_gevent_c_greenlet_primitives.pxd":40
 *     pass
 * 
 * cdef class SwitchOutGreenletWithLoop(TrackedRawGreenlet):             # <<<<<<<<<<<<<<
 *     cdef public loop
 * 
 */
struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop {
  struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet __pyx_base;
  struct __pyx_vtabstruct_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_vtab;
  PyObject *loop;
};


/* "gevent/_gevent_c_waiter.pxd":33
 *         _greenlet_imported = True
 * 
 * cdef class Waiter:             # <<<<<<<<<<<<<<
 *     cdef readonly SwitchOutGreenletWithLoop hub
 *     cdef readonly greenlet greenlet
 */
struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter {
  PyObject_HEAD
  struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter *__pyx_vtab;
  struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *hub;
  PyGreenlet *greenlet;
  PyObject *value;
  PyObject *_exception;
};


/* "gevent/_gevent_c_waiter.pxd":47
 * @cython.final
 * @cython.internal
 * cdef class MultipleWaiter(Waiter):             # <<<<<<<<<<<<<<
 *     cdef list _values
 */
struct __pyx_obj_6gevent_16_gevent_c_waiter_MultipleWaiter {
  struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter __pyx_base;
  PyObject *_values;
};


/* "gevent/_gevent_c_abstract_linkable.pxd":33
 * cdef void _init()
 * 
 * cdef class AbstractLinkable(object):             # <<<<<<<<<<<<<<
 *    # We declare the __weakref__ here in the base (even though
 *    # that's not really what we want) as a workaround for a Cython
 */
struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable {
  PyObject_HEAD
  struct __pyx_vtabstruct_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *__pyx_vtab;
  PyObject *__weakref__;
  struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *hub;
  PyObject *_notifier;
  PyObject *_links;
  int _notify_all;
};


/* "gevent/_gevent_cevent.pxd":13
 * cdef Timeout
 * 
 * cdef class Event(AbstractLinkable):             # <<<<<<<<<<<<<<
 *    cdef bint _flag
 * 
 */
struct __pyx_obj_6gevent_14_gevent_cevent_Event {
  struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable __pyx_base;
  int _flag;
};


/* "gevent/_gevent_cevent.pxd":16
 *    cdef bint _flag
 * 
 * cdef class AsyncResult(AbstractLinkable):             # <<<<<<<<<<<<<<
 *     cdef readonly _value
 *     cdef readonly tuple _exc_info
 */
struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult {
  struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable __pyx_base;
  PyObject *_value;
  PyObject *_exc_info;
  int _imap_task_index;
};


/* "gevent/_gevent_cqueue.pxd":39
 * cdef _safe_remove(deq, item)
 * 
 * cdef class Queue:             # <<<<<<<<<<<<<<
 *     cdef __weakref__
 *     cdef readonly hub
 */
struct __pyx_obj_6gevent_14_gevent_cqueue_Queue {
  PyObject_HEAD
  struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *__pyx_vtab;
  PyObject *__weakref__;
  PyObject *hub;
  PyObject *queue;
  PyObject *getters;
  PyObject *putters;
  PyObject *_event_unlock;
  Py_ssize_t _maxsize;
};


/* "gevent/_gevent_cqueue.pxd":73
 * @cython.final
 * @cython.internal
 * cdef class ItemWaiter(Waiter):             # <<<<<<<<<<<<<<
 *     cdef readonly item
 *     cdef readonly Queue queue
 */
struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter {
  struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter __pyx_base;
  PyObject *item;
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *queue;
};


/* "gevent/_gevent_cqueue.pxd":79
 * 
 * @cython.final
 * cdef class UnboundQueue(Queue):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue {
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue __pyx_base;
};


/* "gevent/_gevent_cqueue.pxd":82
 *     pass
 * 
 * cdef class PriorityQueue(Queue):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue {
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue __pyx_base;
};


/* "gevent/_gevent_cqueue.pxd":85
 *     pass
 * 
 * cdef class LifoQueue(Queue):             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue {
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue __pyx_base;
};


/* "gevent/_gevent_cqueue.pxd":88
 *     pass
 * 
 * cdef class JoinableQueue(Queue):             # <<<<<<<<<<<<<<
 *     cdef Event _cond
 *     cdef readonly int unfinished_tasks
 */
struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue {
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue __pyx_base;
  struct __pyx_obj_6gevent_14_gevent_cevent_Event *_cond;
  int unfinished_tasks;
};


/* "gevent/_gevent_cqueue.pxd":93
 * 
 * 
 * cdef class Channel:             # <<<<<<<<<<<<<<
 *     cdef __weakref__
 *     cdef readonly getters
 */
struct __pyx_obj_6gevent_14_gevent_cqueue_Channel {
  PyObject_HEAD
  struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Channel *__pyx_vtab;
  PyObject *__weakref__;
  PyObject *getters;
  PyObject *putters;
  PyObject *hub;
  PyObject *_event_unlock;
};



/* "gevent/_gevent_c_greenlet_primitives.pxd":40
 *     pass
 * 
 * cdef class SwitchOutGreenletWithLoop(TrackedRawGreenlet):             # <<<<<<<<<<<<<<
 *     cdef public loop
 * 
 */

struct __pyx_vtabstruct_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop {
  PyObject *(*__pyx_switch)(struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *, int __pyx_skip_dispatch);
  PyObject *(*switch_out)(struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_vtabptr_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop;


/* "gevent/_gevent_c_waiter.pxd":33
 *         _greenlet_imported = True
 * 
 * cdef class Waiter:             # <<<<<<<<<<<<<<
 *     cdef readonly SwitchOutGreenletWithLoop hub
 *     cdef readonly greenlet greenlet
 */

struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter {
  PyObject *(*get)(struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *, int __pyx_skip_dispatch);
  PyObject *(*clear)(struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter *__pyx_vtabptr_6gevent_16_gevent_c_waiter_Waiter;


/* "gevent/_gevent_c_waiter.pxd":47
 * @cython.final
 * @cython.internal
 * cdef class MultipleWaiter(Waiter):             # <<<<<<<<<<<<<<
 *     cdef list _values
 */

struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_MultipleWaiter {
  struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter __pyx_base;
};
static struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_MultipleWaiter *__pyx_vtabptr_6gevent_16_gevent_c_waiter_MultipleWaiter;


/* "gevent/_gevent_c_abstract_linkable.pxd":33
 * cdef void _init()
 * 
 * cdef class AbstractLinkable(object):             # <<<<<<<<<<<<<<
 *    # We declare the __weakref__ here in the base (even though
 *    # that's not really what we want) as a workaround for a Cython
 */

struct __pyx_vtabstruct_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable {
  PyObject *(*linkcount)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, int __pyx_skip_dispatch);
  PyObject *(*rawlink)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, PyObject *, int __pyx_skip_dispatch);
  int (*ready)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, int __pyx_skip_dispatch);
  PyObject *(*unlink)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_check_and_notify)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *);
  void (*_capture_hub)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, int);
  PyObject *(*_AbstractLinkable__wait_to_be_notified)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, int);
  void (*_AbstractLinkable__unlink_all)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, PyObject *);
  PyObject *(*_notify_link_list)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, PyObject *);
  PyObject *(*_notify_links)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_drop_lock_for_switch_out)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, int __pyx_skip_dispatch);
  PyObject *(*_acquire_lock_for_switch_in)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, int __pyx_skip_dispatch);
  PyObject *(*_wait_core)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, PyObject *, struct __pyx_opt_args_6gevent_27_gevent_c_abstract_linkable_16AbstractLinkable__wait_core *__pyx_optional_args);
  PyObject *(*_wait_return_value)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, PyObject *, PyObject *);
  PyObject *(*_wait)(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *, struct __pyx_opt_args_6gevent_27_gevent_c_abstract_linkable_16AbstractLinkable__wait *__pyx_optional_args);
};
static struct __pyx_vtabstruct_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable *__pyx_vtabptr_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable;


/* "gevent/_gevent_cevent.pxd":13
 * cdef Timeout
 * 
 * cdef class Event(AbstractLinkable):             # <<<<<<<<<<<<<<
 *    cdef bint _flag
 * 
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cevent_Event {
  struct __pyx_vtabstruct_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable __pyx_base;
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cevent_Event *__pyx_vtabptr_6gevent_14_gevent_cevent_Event;


/* "gevent/_gevent_cevent.pxd":16
 *    cdef bint _flag
 * 
 * cdef class AsyncResult(AbstractLinkable):             # <<<<<<<<<<<<<<
 *     cdef readonly _value
 *     cdef readonly tuple _exc_info
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cevent_AsyncResult {
  struct __pyx_vtabstruct_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable __pyx_base;
  PyObject *(*get)(struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cevent_11AsyncResult_get *__pyx_optional_args);
  int (*successful)(struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult *, int __pyx_skip_dispatch);
  PyObject *(*wait)(struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cevent_11AsyncResult_wait *__pyx_optional_args);
  int (*done)(struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult *, int __pyx_skip_dispatch);
  int (*cancel)(struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult *, int __pyx_skip_dispatch);
  int (*cancelled)(struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cevent_AsyncResult *__pyx_vtabptr_6gevent_14_gevent_cevent_AsyncResult;


/* "src/gevent/queue.py":97
 *         return self.switch(self)
 * 
 * class Queue(object):             # <<<<<<<<<<<<<<
 *     """
 *     Create a queue object with a given maximum size.
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue {
  PyObject *(*_get)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch);
  PyObject *(*_put)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_peek)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch);
  Py_ssize_t (*qsize)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch);
  int (*empty)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch);
  int (*full)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch);
  PyObject *(*_create_queue)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue *__pyx_optional_args);
  PyObject *(*put)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put *__pyx_optional_args);
  PyObject *(*put_nowait)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*_Queue__get_or_peek)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, PyObject *, PyObject *);
  PyObject *(*get)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_get *__pyx_optional_args);
  PyObject *(*get_nowait)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch);
  PyObject *(*peek)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_peek *__pyx_optional_args);
  PyObject *(*peek_nowait)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch);
  PyObject *(*_schedule_unlock)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *);
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *__pyx_vtabptr_6gevent_14_gevent_cqueue_Queue;


/* "src/gevent/queue.py":79
 * locals()['greenlet_init'] = lambda: None
 * 
 * class ItemWaiter(Waiter): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *     # pylint:disable=assigning-non-slot
 *     __slots__ = (
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_ItemWaiter {
  struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter __pyx_base;
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_vtabptr_6gevent_14_gevent_cqueue_ItemWaiter;


/* "src/gevent/queue.py":419
 * 
 * 
 * class UnboundQueue(Queue):             # <<<<<<<<<<<<<<
 *     # A specialization of Queue that knows it can never
 *     # be bound. Changing its maxsize has no effect.
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_UnboundQueue {
  struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue __pyx_base;
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_UnboundQueue *__pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue;


/* "src/gevent/queue.py":437
 * 
 * 
 * class PriorityQueue(Queue):             # <<<<<<<<<<<<<<
 *     '''A subclass of :class:`Queue` that retrieves entries in priority order (lowest first).
 * 
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_PriorityQueue {
  struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue __pyx_base;
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_vtabptr_6gevent_14_gevent_cqueue_PriorityQueue;


/* "src/gevent/queue.py":462
 * 
 * 
 * class LifoQueue(Queue):             # <<<<<<<<<<<<<<
 *     '''A subclass of :class:`Queue` that retrieves most recently added entries first.'''
 * 
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_LifoQueue {
  struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue __pyx_base;
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_LifoQueue *__pyx_vtabptr_6gevent_14_gevent_cqueue_LifoQueue;


/* "src/gevent/queue.py":480
 * 
 * 
 * class JoinableQueue(Queue):             # <<<<<<<<<<<<<<
 *     """
 *     A subclass of :class:`Queue` that additionally has
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_JoinableQueue {
  struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue __pyx_base;
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_vtabptr_6gevent_14_gevent_cqueue_JoinableQueue;


/* "src/gevent/queue.py":566
 * 
 * 
 * class Channel(object):             # <<<<<<<<<<<<<<
 * 
 *     __slots__ = (
 */

struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Channel {
  PyObject *(*get)(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_7Channel_get *__pyx_optional_args);
  PyObject *(*get_nowait)(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *, int __pyx_skip_dispatch);
  PyObject *(*_schedule_unlock)(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *);
};
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Channel *__pyx_vtabptr_6gevent_14_gevent_cqueue_Channel;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#include "src/gevent/_generated_include/Refnanny_proto_4ef9b988ead6754184738a3ee44987523c887875.h"
/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#include "src/gevent/_generated_include/PyErrFetchRestore_proto_e557b335a89c5f3673718071940bbfa92fc27c44.h"
/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#include "src/gevent/_generated_include/fastcall_proto_d252a45912f48b700e5b6607903f91d7133d67b9.h"
/* PyFunctionFastCall.proto */
#include "src/gevent/_generated_include/PyFunctionFastCall_proto_4c4e96d47d0316f69e98693e61d1412a9fd8ed24.h"
/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, nargs, NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    const char* function_name);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);

/* PyDictVersioning.proto */
#include "src/gevent/_generated_include/PyDictVersioning_proto_36f095b0bd887fb7db7a2fb45d0f46d110d1777f.h"
/* GetModuleGlobalName.proto */
#include "src/gevent/_generated_include/GetModuleGlobalName_proto_a47fb7942110f1db16ee3605036c98ce86aed25d.h"
/* GetItemInt.proto */
#include "src/gevent/_generated_include/GetItemInt_proto_2a72bfd08caa1e62d7b31cb875031b18cc21dd9d.h"
/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* PyObjectCall2Args.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION < 3
    #define __Pyx_PyBytes_Join _PyString_Join
    #else
    #define __Pyx_PyBytes_Join _PyBytes_Join
    #endif
#else
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
#endif

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* pop.proto */
static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L);
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L);
#define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\
    __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L))
#else
#define __Pyx_PyList_Pop(L)  __Pyx__PyObject_Pop(L)
#define __Pyx_PyObject_Pop(L)  __Pyx__PyObject_Pop(L)
#endif

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod0.proto */
#include "src/gevent/_generated_include/CallUnboundCMethod0_proto_3ab6fa2fdee0b4e5f5487ed8c262770bd67db280.h"
/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* CallNextTpDealloc.proto */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);

/* CallNextTpTraverse.proto */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);

/* CallNextTpClear.proto */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum __Pyx_ImportType_CheckSize {
   __Pyx_ImportType_CheckSize_Error = 0,
   __Pyx_ImportType_CheckSize_Warn = 1,
   __Pyx_ImportType_CheckSize_Ignore = 2
};
static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
#endif

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#if CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyType_Spec *spec, PyObject *bases);
#endif

/* PyMethodNew.proto */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, CYTHON_UNUSED PyObject *typ) {
    if (!self) {
        Py_INCREF(func);
        return func;
    }
    return PyMethod_New(func, self);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, Py_ssize_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto */
#include "src/gevent/_generated_include/CythonFunctionShared_proto_992b839a2a6cc8f66e70b18da6dfd0adbdb2e563.h"
/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
#endif

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_Occurred(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* VoidPtrExport.proto */
static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig);

/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

/* VoidPtrImport.proto */
static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig);

/* FunctionImport.proto */
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

/* InitStrings.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str);
#else
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
#endif

/* #### Code section: module_declarations ### */
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__get(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__put(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch); /* proto*/
static Py_ssize_t __pyx_f_6gevent_14_gevent_cqueue_5Queue_qsize(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_6gevent_14_gevent_cqueue_5Queue_empty(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static int __pyx_f_6gevent_14_gevent_cqueue_5Queue_full(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_put(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_put_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__Queue__get_or_peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_get(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_get *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_get_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_peek *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_peek_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__schedule_unlock(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_12UnboundQueue_put(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_item, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_12UnboundQueue_put *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__put(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__get(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_9LifoQueue__create_queue *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__put(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__get(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__peek(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_13JoinableQueue__put(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_7Channel_get(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_7Channel_get *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_7Channel_get_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_7Channel__schedule_unlock(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto*/

/* Module declarations from "cython" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "greenlet" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif

/* Module declarations from "gevent._gevent_c_greenlet_primitives" */
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject *__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_greenlet = 0;
static PyTypeObject *__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet = 0;
static PyTypeObject *__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop = 0;
#endif
static PyObject **__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_get_objects = 0;
#define __pyx_v_6gevent_29_gevent_c_greenlet_primitives_get_objects (*__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_get_objects)
static PyObject **__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_wref = 0;
#define __pyx_v_6gevent_29_gevent_c_greenlet_primitives_wref (*__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_wref)
static PyObject **__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_BlockingSwitchOutError = 0;
#define __pyx_v_6gevent_29_gevent_c_greenlet_primitives_BlockingSwitchOutError (*__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_BlockingSwitchOutError)
static int *__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__greenlet_imported = 0;
#define __pyx_v_6gevent_29_gevent_c_greenlet_primitives__greenlet_imported (*__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__greenlet_imported)
static PyTypeObject **__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__memoryview = 0;
#define __pyx_v_6gevent_29_gevent_c_greenlet_primitives__memoryview (*__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__memoryview)
static PyTypeObject **__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__buffer = 0;
#define __pyx_v_6gevent_29_gevent_c_greenlet_primitives__buffer (*__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__buffer)

/* Module declarations from "gevent._gevent_c_hub_local" */
#if !CYTHON_COMPILING_IN_LIMITED_API
#endif
static PyObject **__pyx_vp_6gevent_19_gevent_c_hub_local__threadlocal = 0;
#define __pyx_v_6gevent_19_gevent_c_hub_local__threadlocal (*__pyx_vp_6gevent_19_gevent_c_hub_local__threadlocal)
static struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *(*__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_if_exists)(int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *(*__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_noargs)(int __pyx_skip_dispatch); /*proto*/

/* Module declarations from "gevent._gevent_c_waiter" */
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject *__pyx_ptype_6gevent_16_gevent_c_waiter_greenlet = 0;
static PyTypeObject *__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter = 0;
static PyTypeObject *__pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter = 0;
#endif
static PyObject **__pyx_vp_6gevent_16_gevent_c_waiter_sys = 0;
#define __pyx_v_6gevent_16_gevent_c_waiter_sys (*__pyx_vp_6gevent_16_gevent_c_waiter_sys)
static PyObject **__pyx_vp_6gevent_16_gevent_c_waiter_ConcurrentObjectUseError = 0;
#define __pyx_v_6gevent_16_gevent_c_waiter_ConcurrentObjectUseError (*__pyx_vp_6gevent_16_gevent_c_waiter_ConcurrentObjectUseError)
static int *__pyx_vp_6gevent_16_gevent_c_waiter__greenlet_imported = 0;
#define __pyx_v_6gevent_16_gevent_c_waiter__greenlet_imported (*__pyx_vp_6gevent_16_gevent_c_waiter__greenlet_imported)
static PyObject **__pyx_vp_6gevent_16_gevent_c_waiter__NONE = 0;
#define __pyx_v_6gevent_16_gevent_c_waiter__NONE (*__pyx_vp_6gevent_16_gevent_c_waiter__NONE)

/* Module declarations from "gevent._gevent_c_abstract_linkable" */
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject *__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_greenlet = 0;
static PyTypeObject *__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable = 0;
#endif
static PyObject **__pyx_vp_6gevent_27_gevent_c_abstract_linkable_InvalidSwitchError = 0;
#define __pyx_v_6gevent_27_gevent_c_abstract_linkable_InvalidSwitchError (*__pyx_vp_6gevent_27_gevent_c_abstract_linkable_InvalidSwitchError)
static PyObject **__pyx_vp_6gevent_27_gevent_c_abstract_linkable_Timeout = 0;
#define __pyx_v_6gevent_27_gevent_c_abstract_linkable_Timeout (*__pyx_vp_6gevent_27_gevent_c_abstract_linkable_Timeout)
static int *__pyx_vp_6gevent_27_gevent_c_abstract_linkable__greenlet_imported = 0;
#define __pyx_v_6gevent_27_gevent_c_abstract_linkable__greenlet_imported (*__pyx_vp_6gevent_27_gevent_c_abstract_linkable__greenlet_imported)

/* Module declarations from "gevent._gevent_cevent" */
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cevent_Event = 0;
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cevent_AsyncResult = 0;
#endif
static PyObject **__pyx_vp_6gevent_14_gevent_cevent__None = 0;
#define __pyx_v_6gevent_14_gevent_cevent__None (*__pyx_vp_6gevent_14_gevent_cevent__None)
static PyObject **__pyx_vp_6gevent_14_gevent_cevent_reraise = 0;
#define __pyx_v_6gevent_14_gevent_cevent_reraise (*__pyx_vp_6gevent_14_gevent_cevent_reraise)
static PyObject **__pyx_vp_6gevent_14_gevent_cevent_dump_traceback = 0;
#define __pyx_v_6gevent_14_gevent_cevent_dump_traceback (*__pyx_vp_6gevent_14_gevent_cevent_dump_traceback)
static PyObject **__pyx_vp_6gevent_14_gevent_cevent_load_traceback = 0;
#define __pyx_v_6gevent_14_gevent_cevent_load_traceback (*__pyx_vp_6gevent_14_gevent_cevent_load_traceback)
static PyObject **__pyx_vp_6gevent_14_gevent_cevent_Timeout = 0;
#define __pyx_v_6gevent_14_gevent_cevent_Timeout (*__pyx_vp_6gevent_14_gevent_cevent_Timeout)

/* Module declarations from "gevent._gevent_cqueue" */
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_greenlet = 0;
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_Queue = 0;
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter = 0;
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue = 0;
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue = 0;
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue = 0;
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue = 0;
static PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_Channel = 0;
#endif
static int __pyx_v_6gevent_14_gevent_cqueue__greenlet_imported;
static PyObject *__pyx_v_6gevent_14_gevent_cqueue__heappush = 0;
static PyObject *__pyx_v_6gevent_14_gevent_cqueue__heappop = 0;
static PyObject *__pyx_v_6gevent_14_gevent_cqueue__heapify = 0;
static PyObject *__pyx_v_6gevent_14_gevent_cqueue__Empty = 0;
static PyObject *__pyx_v_6gevent_14_gevent_cqueue__Full = 0;
static PyObject *__pyx_v_6gevent_14_gevent_cqueue_Timeout = 0;
static PyObject *__pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError = 0;
static CYTHON_INLINE PyGreenlet *__pyx_f_6gevent_14_gevent_cqueue_getcurrent(void); /*proto*/
static CYTHON_INLINE void __pyx_f_6gevent_14_gevent_cqueue_greenlet_init(void); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue__safe_remove(PyObject *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "gevent._gevent_cqueue"
extern int __pyx_module_is_main_gevent___gevent_cqueue;
int __pyx_module_is_main_gevent___gevent_cqueue = 0;

/* Implementation of "gevent._gevent_cqueue" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin___import__;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_DeprecationWarning;
static PyObject *__pyx_builtin_hex;
static PyObject *__pyx_builtin_id;
static PyObject *__pyx_builtin_StopIteration;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = "*";
static const char __pyx_k__3[] = " ";
static const char __pyx_k__4[] = "";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_all[] = "__all__";
static const char __pyx_k_get[] = "_get";
static const char __pyx_k_hex[] = "hex";
static const char __pyx_k_hub[] = "hub";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_put[] = "_put";
static const char __pyx_k_s_s[] = "<%s%s>";
static const char __pyx_k_set[] = "set";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_Full[] = "Full";
static const char __pyx_k_cond[] = "_cond";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_full[] = "full";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_loop[] = "loop";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_next[] = "__next__";
static const char __pyx_k_peek[] = "_peek";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_wait[] = "wait";
static const char __pyx_k_warn[] = "warn";
static const char __pyx_k_Empty[] = "Empty";
static const char __pyx_k_Event[] = "Event";
static const char __pyx_k_Queue[] = "Queue";
static const char __pyx_k_block[] = "block";
static const char __pyx_k_clear[] = "clear";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_deque[] = "deque";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_get_2[] = "get";
static const char __pyx_k_heapq[] = "heapq";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_put_2[] = "put";
static const char __pyx_k_qsize[] = "qsize";
static const char __pyx_k_queue[] = "queue";
static const char __pyx_k_s_s_2[] = "<%s %s>";
static const char __pyx_k_slots[] = "__slots__";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_Full_2[] = "_Full";
static const char __pyx_k_Waiter[] = "Waiter";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_cancel[] = "cancel";
static const char __pyx_k_format[] = "_format";
static const char __pyx_k_getter[] = "getter";
static const char __pyx_k_gevent[] = "gevent";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_init_2[] = "_init";
static const char __pyx_k_lambda[] = "<lambda>";
static const char __pyx_k_next_2[] = "next";
static const char __pyx_k_peek_2[] = "peek";
static const char __pyx_k_putter[] = "putter";
static const char __pyx_k_remove[] = "remove";
static const char __pyx_k_repeat[] = "repeat";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_switch[] = "switch";
static const char __pyx_k_unlock[] = "_unlock";
static const char __pyx_k_waiter[] = "_waiter";
static const char __pyx_k_Channel[] = "Channel";
static const char __pyx_k_Empty_2[] = "_Empty";
static const char __pyx_k_Timeout[] = "Timeout";
static const char __pyx_k_getters[] = "getters";
static const char __pyx_k_heapify[] = "_heapify";
static const char __pyx_k_heappop[] = "_heappop";
static const char __pyx_k_imports[] = "__imports__";
static const char __pyx_k_maxsize[] = "maxsize";
static const char __pyx_k_popleft[] = "popleft";
static const char __pyx_k_putters[] = "putters";
static const char __pyx_k_queue_2[] = "__queue__";
static const char __pyx_k_queue_r[] = "queue=%r";
static const char __pyx_k_timeout[] = "timeout";
static const char __pyx_k_weakref[] = "__weakref__";
static const char __pyx_k_exc_info[] = "exc_info";
static const char __pyx_k_greenlet[] = "greenlet";
static const char __pyx_k_heappush[] = "_heappush";
static const char __pyx_k_pyx_capi[] = "__pyx_capi__";
static const char __pyx_k_s_at_s_s[] = "<%s at %s%s>";
static const char __pyx_k_waiter_2[] = "waiter";
static const char __pyx_k_warnings[] = "warnings";
static const char __pyx_k_LifoQueue[] = "LifoQueue";
static const char __pyx_k_Queue_get[] = "Queue.get";
static const char __pyx_k_Queue_put[] = "Queue.put";
static const char __pyx_k_getters_s[] = "getters[%s]";
static const char __pyx_k_heapify_2[] = "heapify";
static const char __pyx_k_heappop_2[] = "heappop";
static const char __pyx_k_maxsize_2[] = "_maxsize";
static const char __pyx_k_maxsize_r[] = "maxsize=%r";
static const char __pyx_k_putters_s[] = "putters[%s]";
static const char __pyx_k_task_done[] = "task_done";
static const char __pyx_k_ItemWaiter[] = "ItemWaiter";
static const char __pyx_k_Queue__get[] = "Queue._get";
static const char __pyx_k_Queue__put[] = "Queue._put";
static const char __pyx_k_Queue_copy[] = "Queue.copy";
static const char __pyx_k_Queue_full[] = "Queue.full";
static const char __pyx_k_Queue_peek[] = "Queue.peek";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_extensions[] = "__extensions__";
static const char __pyx_k_get_nowait[] = "get_nowait";
static const char __pyx_k_getcurrent[] = "getcurrent";
static const char __pyx_k_heappush_2[] = "heappush";
static const char __pyx_k_implements[] = "__implements__";
static const char __pyx_k_put_nowait[] = "put_nowait";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_s_at_s_s_2[] = "<%s at %s %s>";
static const char __pyx_k_stacklevel[] = "stacklevel";
static const char __pyx_k_warn_depth[] = "_warn_depth";
static const char __pyx_k_Channel_get[] = "Channel.get";
static const char __pyx_k_Channel_put[] = "Channel.put";
static const char __pyx_k_Queue__peek[] = "Queue._peek";
static const char __pyx_k_Queue_empty[] = "Queue.empty";
static const char __pyx_k_Queue_qsize[] = "Queue.qsize";
static const char __pyx_k_SimpleQueue[] = "SimpleQueue";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_getters_s_2[] = " getters[%s]";
static const char __pyx_k_peek_nowait[] = "peek_nowait";
static const char __pyx_k_putters_s_2[] = " putters[%s]";
static const char __pyx_k_Channel_full[] = "Channel.full";
static const char __pyx_k_UnboundQueue[] = "UnboundQueue";
static const char __pyx_k_create_queue[] = "_create_queue";
static const char __pyx_k_event_unlock[] = "_event_unlock";
static const char __pyx_k_gevent__util[] = "gevent._util";
static const char __pyx_k_gevent_event[] = "gevent.event";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_run_callback[] = "run_callback";
static const char __pyx_k_version_info[] = "version_info";
static const char __pyx_k_Channel_empty[] = "Channel.empty";
static const char __pyx_k_Channel_qsize[] = "Channel.qsize";
static const char __pyx_k_JoinableQueue[] = "JoinableQueue";
static const char __pyx_k_PriorityQueue[] = "PriorityQueue";
static const char __pyx_k_PySimpleQueue[] = "_PySimpleQueue";
static const char __pyx_k_Queue__format[] = "Queue._format";
static const char __pyx_k_Queue__unlock[] = "Queue._unlock";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_gevent__queue[] = "gevent._queue";
static const char __pyx_k_greenlet_init[] = "greenlet_init";
static const char __pyx_k_LifoQueue__get[] = "LifoQueue._get";
static const char __pyx_k_LifoQueue__put[] = "LifoQueue._put";
static const char __pyx_k_get_hub_noargs[] = "get_hub_noargs";
static const char __pyx_k_gevent__waiter[] = "gevent._waiter";
static const char __pyx_k_gevent_timeout[] = "gevent.timeout";
static const char __pyx_k_import_c_accel[] = "import_c_accel";
static const char __pyx_k_put_and_switch[] = "put_and_switch";
static const char __pyx_k_Channel__format[] = "Channel._format";
static const char __pyx_k_Channel__unlock[] = "Channel._unlock";
static const char __pyx_k_LifoQueue__peek[] = "LifoQueue._peek";
static const char __pyx_k_tasks_s__cond_s[] = " tasks=%s _cond=%s";
static const char __pyx_k_Queue_get_nowait[] = "Queue.get_nowait";
static const char __pyx_k_Queue_put_nowait[] = "Queue.put_nowait";
static const char __pyx_k_UnboundQueue_put[] = "UnboundQueue.put";
static const char __pyx_k_unfinished_tasks[] = "unfinished_tasks";
static const char __pyx_k_Queue_peek_nowait[] = "Queue.peek_nowait";
static const char __pyx_k_gevent__hub_local[] = "gevent._hub_local";
static const char __pyx_k_gevent_exceptions[] = "gevent.exceptions";
static const char __pyx_k_greenlet_imported[] = "_greenlet_imported";
static const char __pyx_k_Channel_get_nowait[] = "Channel.get_nowait";
static const char __pyx_k_Channel_put_nowait[] = "Channel.put_nowait";
static const char __pyx_k_DeprecationWarning[] = "DeprecationWarning";
static const char __pyx_k_InvalidSwitchError[] = "InvalidSwitchError";
static const char __pyx_k_JoinableQueue__put[] = "JoinableQueue._put";
static const char __pyx_k_JoinableQueue_copy[] = "JoinableQueue.copy";
static const char __pyx_k_JoinableQueue_join[] = "JoinableQueue.join";
static const char __pyx_k_PriorityQueue__get[] = "PriorityQueue._get";
static const char __pyx_k_PriorityQueue__put[] = "PriorityQueue._put";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_start_new_or_dummy[] = "_start_new_or_dummy";
static const char __pyx_k_Queue__create_queue[] = "Queue._create_queue";
static const char __pyx_k_src_gevent_queue_py[] = "src/gevent/queue.py";
static const char __pyx_k_JoinableQueue__format[] = "JoinableQueue._format";
static const char __pyx_k_gevent__gevent_cqueue[] = "gevent._gevent_cqueue";
static const char __pyx_k_JoinableQueue_task_done[] = "JoinableQueue.task_done";
static const char __pyx_k_LifoQueue__create_queue[] = "LifoQueue._create_queue";
static const char __pyx_k_ItemWaiter_put_and_switch[] = "ItemWaiter.put_and_switch";
static const char __pyx_k_PriorityQueue__create_queue[] = "PriorityQueue._create_queue";
static const char __pyx_k_UnboundQueue_has_no_maxsize[] = "UnboundQueue has no maxsize";
static const char __pyx_k_Channels_have_a_maxsize_of_1[] = "Channels have a maxsize of 1";
static const char __pyx_k_Invalid_switch_into_Channel_put[] = "Invalid switch into Channel.put: %r";
static const char __pyx_k_Invalid_switch_into_Queue_get_r[] = "Invalid switch into Queue.get: %r";
static const char __pyx_k_Invalid_switch_into_Queue_put_r[] = "Invalid switch into Queue.put: %r";
static const char __pyx_k_Queue_0_now_equivalent_to_Queue[] = "Queue(0) now equivalent to Queue(None); if you want a channel, use Channel";
static const char __pyx_k_Synchronized_queues_The_mod_gev[] = "\nSynchronized queues.\n\nThe :mod:`gevent.queue` module implements multi-producer, multi-consumer queues\nthat work across greenlets, with the API similar to the classes found in the\nstandard :mod:`Queue` and :class:`multiprocessing <multiprocessing.Queue>` modules.\n\nThe classes in this module implement the iterator protocol. Iterating\nover a queue means repeatedly calling :meth:`get <Queue.get>` until\n:meth:`get <Queue.get>` returns ``StopIteration`` (specifically that\nclass, not an instance or subclass).\n\n    >>> queue = gevent.queue.Queue()\n    >>> queue.put(1)\n    >>> queue.put(2)\n    >>> queue.put(StopIteration)\n    >>> for item in queue:\n    ...    print(item)\n    1\n    2\n\n.. versionchanged:: 1.0\n       ``Queue(0)`` now means queue of infinite size, not a channel. A :exc:`DeprecationWarning`\n       will be issued with this argument.\n";
static const char __pyx_k_task_done_called_too_many_times[] = "task_done() called too many times";
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__pyx_n_s_;
static PyObject *__pyx_n_s_Channel;
static PyObject *__pyx_n_s_Channel__format;
static PyObject *__pyx_n_s_Channel__unlock;
static PyObject *__pyx_n_s_Channel_empty;
static PyObject *__pyx_n_s_Channel_full;
static PyObject *__pyx_n_s_Channel_get;
static PyObject *__pyx_n_s_Channel_get_nowait;
static PyObject *__pyx_n_s_Channel_put;
static PyObject *__pyx_n_s_Channel_put_nowait;
static PyObject *__pyx_n_s_Channel_qsize;
static PyObject *__pyx_kp_s_Channels_have_a_maxsize_of_1;
static PyObject *__pyx_n_s_DeprecationWarning;
static PyObject *__pyx_n_s_Empty;
static PyObject *__pyx_n_s_Empty_2;
static PyObject *__pyx_n_s_Event;
static PyObject *__pyx_n_s_Full;
static PyObject *__pyx_n_s_Full_2;
static PyObject *__pyx_n_s_InvalidSwitchError;
static PyObject *__pyx_kp_s_Invalid_switch_into_Channel_put;
static PyObject *__pyx_kp_s_Invalid_switch_into_Queue_get_r;
static PyObject *__pyx_kp_s_Invalid_switch_into_Queue_put_r;
static PyObject *__pyx_n_s_ItemWaiter;
static PyObject *__pyx_n_s_ItemWaiter_put_and_switch;
static PyObject *__pyx_n_s_JoinableQueue;
static PyObject *__pyx_n_s_JoinableQueue__format;
static PyObject *__pyx_n_s_JoinableQueue__put;
static PyObject *__pyx_n_s_JoinableQueue_copy;
static PyObject *__pyx_n_s_JoinableQueue_join;
static PyObject *__pyx_n_s_JoinableQueue_task_done;
static PyObject *__pyx_n_s_LifoQueue;
static PyObject *__pyx_n_s_LifoQueue__create_queue;
static PyObject *__pyx_n_s_LifoQueue__get;
static PyObject *__pyx_n_s_LifoQueue__peek;
static PyObject *__pyx_n_s_LifoQueue__put;
static PyObject *__pyx_n_s_PriorityQueue;
static PyObject *__pyx_n_s_PriorityQueue__create_queue;
static PyObject *__pyx_n_s_PriorityQueue__get;
static PyObject *__pyx_n_s_PriorityQueue__put;
static PyObject *__pyx_n_s_PySimpleQueue;
static PyObject *__pyx_n_s_Queue;
static PyObject *__pyx_kp_s_Queue_0_now_equivalent_to_Queue;
static PyObject *__pyx_n_s_Queue__create_queue;
static PyObject *__pyx_n_s_Queue__format;
static PyObject *__pyx_n_s_Queue__get;
static PyObject *__pyx_n_s_Queue__peek;
static PyObject *__pyx_n_s_Queue__put;
static PyObject *__pyx_n_s_Queue__unlock;
static PyObject *__pyx_n_s_Queue_copy;
static PyObject *__pyx_n_s_Queue_empty;
static PyObject *__pyx_n_s_Queue_full;
static PyObject *__pyx_n_s_Queue_get;
static PyObject *__pyx_n_s_Queue_get_nowait;
static PyObject *__pyx_n_s_Queue_peek;
static PyObject *__pyx_n_s_Queue_peek_nowait;
static PyObject *__pyx_n_s_Queue_put;
static PyObject *__pyx_n_s_Queue_put_nowait;
static PyObject *__pyx_n_s_Queue_qsize;
static PyObject *__pyx_n_s_SimpleQueue;
static PyObject *__pyx_n_s_StopIteration;
static PyObject *__pyx_n_s_Timeout;
static PyObject *__pyx_n_s_UnboundQueue;
static PyObject *__pyx_kp_s_UnboundQueue_has_no_maxsize;
static PyObject *__pyx_n_s_UnboundQueue_put;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_Waiter;
static PyObject *__pyx_kp_s__3;
static PyObject *__pyx_kp_s__4;
static PyObject *__pyx_n_s_all;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_block;
static PyObject *__pyx_n_s_cancel;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_cond;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_create_queue;
static PyObject *__pyx_n_s_deque;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_empty;
static PyObject *__pyx_n_s_event_unlock;
static PyObject *__pyx_n_s_exc_info;
static PyObject *__pyx_n_s_extensions;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_full;
static PyObject *__pyx_n_s_get;
static PyObject *__pyx_n_s_get_2;
static PyObject *__pyx_n_s_get_hub_noargs;
static PyObject *__pyx_n_s_get_nowait;
static PyObject *__pyx_n_s_getcurrent;
static PyObject *__pyx_n_s_getter;
static PyObject *__pyx_n_s_getters;
static PyObject *__pyx_kp_s_getters_s;
static PyObject *__pyx_kp_s_getters_s_2;
static PyObject *__pyx_n_s_gevent;
static PyObject *__pyx_n_s_gevent__gevent_cqueue;
static PyObject *__pyx_n_s_gevent__hub_local;
static PyObject *__pyx_kp_s_gevent__queue;
static PyObject *__pyx_n_s_gevent__util;
static PyObject *__pyx_n_s_gevent__waiter;
static PyObject *__pyx_n_s_gevent_event;
static PyObject *__pyx_n_s_gevent_exceptions;
static PyObject *__pyx_n_s_gevent_timeout;
static PyObject *__pyx_n_s_greenlet;
static PyObject *__pyx_n_s_greenlet_imported;
static PyObject *__pyx_n_s_greenlet_init;
static PyObject *__pyx_n_s_heapify;
static PyObject *__pyx_n_s_heapify_2;
static PyObject *__pyx_n_s_heappop;
static PyObject *__pyx_n_s_heappop_2;
static PyObject *__pyx_n_s_heappush;
static PyObject *__pyx_n_s_heappush_2;
static PyObject *__pyx_n_s_heapq;
static PyObject *__pyx_n_s_hex;
static PyObject *__pyx_n_s_hub;
static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_implements;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_import_c_accel;
static PyObject *__pyx_n_s_imports;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_init_2;
static PyObject *__pyx_n_s_initializing;
static PyObject *__pyx_n_s_item;
static PyObject *__pyx_n_s_items;
static PyObject *__pyx_n_s_join;
static PyObject *__pyx_n_s_lambda;
static PyObject *__pyx_n_s_loop;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_maxsize;
static PyObject *__pyx_n_s_maxsize_2;
static PyObject *__pyx_kp_s_maxsize_r;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_next;
static PyObject *__pyx_n_s_next_2;
static PyObject *__pyx_n_s_peek;
static PyObject *__pyx_n_s_peek_2;
static PyObject *__pyx_n_s_peek_nowait;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_popleft;
static PyObject *__pyx_n_s_put;
static PyObject *__pyx_n_s_put_2;
static PyObject *__pyx_n_s_put_and_switch;
static PyObject *__pyx_n_s_put_nowait;
static PyObject *__pyx_n_s_putter;
static PyObject *__pyx_n_s_putters;
static PyObject *__pyx_kp_s_putters_s;
static PyObject *__pyx_kp_s_putters_s_2;
static PyObject *__pyx_n_s_pyx_capi;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_qsize;
static PyObject *__pyx_n_s_queue;
static PyObject *__pyx_n_s_queue_2;
static PyObject *__pyx_kp_s_queue_r;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_s_repeat;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_run_callback;
static PyObject *__pyx_kp_s_s_at_s_s;
static PyObject *__pyx_kp_s_s_at_s_s_2;
static PyObject *__pyx_kp_s_s_s;
static PyObject *__pyx_kp_s_s_s_2;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_set;
static PyObject *__pyx_n_s_slots;
static PyObject *__pyx_n_s_spec;
static PyObject *__pyx_kp_s_src_gevent_queue_py;
static PyObject *__pyx_n_s_stacklevel;
static PyObject *__pyx_n_s_start_new_or_dummy;
static PyObject *__pyx_n_s_switch;
static PyObject *__pyx_n_s_sys;
static PyObject *__pyx_n_s_task_done;
static PyObject *__pyx_kp_s_task_done_called_too_many_times;
static PyObject *__pyx_kp_s_tasks_s__cond_s;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_n_s_timeout;
static PyObject *__pyx_n_s_unfinished_tasks;
static PyObject *__pyx_n_s_unlock;
static PyObject *__pyx_n_s_version_info;
static PyObject *__pyx_n_s_wait;
static PyObject *__pyx_n_s_waiter;
static PyObject *__pyx_n_s_waiter_2;
static PyObject *__pyx_n_s_warn;
static PyObject *__pyx_n_s_warn_depth;
static PyObject *__pyx_n_s_warnings;
static PyObject *__pyx_n_s_weakref;
#endif
/* #### Code section: decls ### */
static PyObject *__pyx_lambda_funcdef_6gevent_14_gevent_cqueue_lambda(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_queue); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_2put_and_switch(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_4item___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_5queue___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_14_gevent_cqueue_5Queue___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items, PyObject *__pyx_v__warn_depth); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_7maxsize___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_14_gevent_cqueue_5Queue_7maxsize_2__set__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_nv); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_2copy(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_4_create_queue(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_items); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_6_get(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_8_peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_10_put(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_12__repr__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_14__str__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_16_format(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_18qsize(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_6gevent_14_gevent_cqueue_5Queue_20__len__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_14_gevent_cqueue_5Queue_22__bool__(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_14_gevent_cqueue_5Queue_24__nonzero__(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_26empty(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_28full(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_30put(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_32put_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_34get(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_36get_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_38peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_40peek_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_42_unlock(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_44__iter__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_46__next__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_3hub___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_5queue___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_14_gevent_cqueue_12UnboundQueue___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_12UnboundQueue_2put(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_items); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue_2_put(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue_4_get(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue__create_queue(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_items); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_2_put(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_4_get(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_6_peek(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items, PyObject *__pyx_v_unfinished_tasks); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_2copy(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_4_format(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_6_put(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_8task_done(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_10join(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_16unfinished_tasks___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self); /* proto */
static int __pyx_pf_6gevent_14_gevent_cqueue_7Channel___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, PyObject *__pyx_v_maxsize); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_2__repr__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_4__str__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_6_format(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_7balance___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_8qsize(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_10empty(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_12full(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_14put(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_16put_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_18get(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_20get_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_22_unlock(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_24__iter__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_26__next__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_7getters___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_7putters___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_3hub___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6gevent_14_gevent_cqueue__init(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_Queue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_ItemWaiter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_UnboundQueue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_PriorityQueue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_LifoQueue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_JoinableQueue(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_Channel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop = {0, 0, 0, 0, 0};
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
#endif
#if !CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_codeobj__12;
static PyObject *__pyx_codeobj__15;
static PyObject *__pyx_codeobj__17;
static PyObject *__pyx_codeobj__19;
static PyObject *__pyx_codeobj__21;
static PyObject *__pyx_codeobj__23;
static PyObject *__pyx_codeobj__25;
static PyObject *__pyx_codeobj__27;
static PyObject *__pyx_codeobj__29;
static PyObject *__pyx_codeobj__31;
static PyObject *__pyx_codeobj__33;
static PyObject *__pyx_codeobj__35;
static PyObject *__pyx_codeobj__37;
static PyObject *__pyx_codeobj__39;
static PyObject *__pyx_codeobj__41;
static PyObject *__pyx_codeobj__43;
static PyObject *__pyx_codeobj__45;
static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__51;
static PyObject *__pyx_codeobj__53;
static PyObject *__pyx_codeobj__55;
static PyObject *__pyx_codeobj__57;
static PyObject *__pyx_codeobj__59;
static PyObject *__pyx_codeobj__61;
static PyObject *__pyx_codeobj__64;
static PyObject *__pyx_codeobj__66;
static PyObject *__pyx_codeobj__68;
static PyObject *__pyx_codeobj__70;
static PyObject *__pyx_codeobj__72;
static PyObject *__pyx_codeobj__75;
static PyObject *__pyx_codeobj__77;
static PyObject *__pyx_codeobj__79;
static PyObject *__pyx_codeobj__81;
static PyObject *__pyx_codeobj__83;
static PyObject *__pyx_codeobj__85;
static PyObject *__pyx_codeobj__87;
static PyObject *__pyx_codeobj__89;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__92;
#endif
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  PyTypeObject *__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_greenlet;
  PyTypeObject *__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet;
  PyTypeObject *__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop;
  PyTypeObject *__pyx_ptype_6gevent_16_gevent_c_waiter_greenlet;
  PyTypeObject *__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter;
  PyTypeObject *__pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter;
  PyTypeObject *__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_greenlet;
  PyTypeObject *__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cevent_Event;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cevent_AsyncResult;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_greenlet;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_Queue;
  PyObject *__pyx_type_6gevent_14_gevent_cqueue_Queue;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter;
  PyObject *__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue;
  PyObject *__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue;
  PyObject *__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue;
  PyObject *__pyx_type_6gevent_14_gevent_cqueue_LifoQueue;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue;
  PyObject *__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue;
  PyTypeObject *__pyx_ptype_6gevent_14_gevent_cqueue_Channel;
  PyObject *__pyx_type_6gevent_14_gevent_cqueue_Channel;
  PyObject *__pyx_n_s_;
  PyObject *__pyx_n_s_Channel;
  PyObject *__pyx_n_s_Channel__format;
  PyObject *__pyx_n_s_Channel__unlock;
  PyObject *__pyx_n_s_Channel_empty;
  PyObject *__pyx_n_s_Channel_full;
  PyObject *__pyx_n_s_Channel_get;
  PyObject *__pyx_n_s_Channel_get_nowait;
  PyObject *__pyx_n_s_Channel_put;
  PyObject *__pyx_n_s_Channel_put_nowait;
  PyObject *__pyx_n_s_Channel_qsize;
  PyObject *__pyx_kp_s_Channels_have_a_maxsize_of_1;
  PyObject *__pyx_n_s_DeprecationWarning;
  PyObject *__pyx_n_s_Empty;
  PyObject *__pyx_n_s_Empty_2;
  PyObject *__pyx_n_s_Event;
  PyObject *__pyx_n_s_Full;
  PyObject *__pyx_n_s_Full_2;
  PyObject *__pyx_n_s_InvalidSwitchError;
  PyObject *__pyx_kp_s_Invalid_switch_into_Channel_put;
  PyObject *__pyx_kp_s_Invalid_switch_into_Queue_get_r;
  PyObject *__pyx_kp_s_Invalid_switch_into_Queue_put_r;
  PyObject *__pyx_n_s_ItemWaiter;
  PyObject *__pyx_n_s_ItemWaiter_put_and_switch;
  PyObject *__pyx_n_s_JoinableQueue;
  PyObject *__pyx_n_s_JoinableQueue__format;
  PyObject *__pyx_n_s_JoinableQueue__put;
  PyObject *__pyx_n_s_JoinableQueue_copy;
  PyObject *__pyx_n_s_JoinableQueue_join;
  PyObject *__pyx_n_s_JoinableQueue_task_done;
  PyObject *__pyx_n_s_LifoQueue;
  PyObject *__pyx_n_s_LifoQueue__create_queue;
  PyObject *__pyx_n_s_LifoQueue__get;
  PyObject *__pyx_n_s_LifoQueue__peek;
  PyObject *__pyx_n_s_LifoQueue__put;
  PyObject *__pyx_n_s_PriorityQueue;
  PyObject *__pyx_n_s_PriorityQueue__create_queue;
  PyObject *__pyx_n_s_PriorityQueue__get;
  PyObject *__pyx_n_s_PriorityQueue__put;
  PyObject *__pyx_n_s_PySimpleQueue;
  PyObject *__pyx_n_s_Queue;
  PyObject *__pyx_kp_s_Queue_0_now_equivalent_to_Queue;
  PyObject *__pyx_n_s_Queue__create_queue;
  PyObject *__pyx_n_s_Queue__format;
  PyObject *__pyx_n_s_Queue__get;
  PyObject *__pyx_n_s_Queue__peek;
  PyObject *__pyx_n_s_Queue__put;
  PyObject *__pyx_n_s_Queue__unlock;
  PyObject *__pyx_n_s_Queue_copy;
  PyObject *__pyx_n_s_Queue_empty;
  PyObject *__pyx_n_s_Queue_full;
  PyObject *__pyx_n_s_Queue_get;
  PyObject *__pyx_n_s_Queue_get_nowait;
  PyObject *__pyx_n_s_Queue_peek;
  PyObject *__pyx_n_s_Queue_peek_nowait;
  PyObject *__pyx_n_s_Queue_put;
  PyObject *__pyx_n_s_Queue_put_nowait;
  PyObject *__pyx_n_s_Queue_qsize;
  PyObject *__pyx_n_s_SimpleQueue;
  PyObject *__pyx_n_s_StopIteration;
  PyObject *__pyx_n_s_Timeout;
  PyObject *__pyx_n_s_UnboundQueue;
  PyObject *__pyx_kp_s_UnboundQueue_has_no_maxsize;
  PyObject *__pyx_n_s_UnboundQueue_put;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_Waiter;
  PyObject *__pyx_kp_s__3;
  PyObject *__pyx_kp_s__4;
  PyObject *__pyx_n_s_all;
  PyObject *__pyx_n_s_append;
  PyObject *__pyx_n_s_block;
  PyObject *__pyx_n_s_cancel;
  PyObject *__pyx_n_s_clear;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_close;
  PyObject *__pyx_n_s_collections;
  PyObject *__pyx_n_s_cond;
  PyObject *__pyx_n_s_copy;
  PyObject *__pyx_n_s_create_queue;
  PyObject *__pyx_n_s_deque;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_empty;
  PyObject *__pyx_n_s_event_unlock;
  PyObject *__pyx_n_s_exc_info;
  PyObject *__pyx_n_s_extensions;
  PyObject *__pyx_n_s_format;
  PyObject *__pyx_n_s_full;
  PyObject *__pyx_n_s_get;
  PyObject *__pyx_n_s_get_2;
  PyObject *__pyx_n_s_get_hub_noargs;
  PyObject *__pyx_n_s_get_nowait;
  PyObject *__pyx_n_s_getcurrent;
  PyObject *__pyx_n_s_getter;
  PyObject *__pyx_n_s_getters;
  PyObject *__pyx_kp_s_getters_s;
  PyObject *__pyx_kp_s_getters_s_2;
  PyObject *__pyx_n_s_gevent;
  PyObject *__pyx_n_s_gevent__gevent_cqueue;
  PyObject *__pyx_n_s_gevent__hub_local;
  PyObject *__pyx_kp_s_gevent__queue;
  PyObject *__pyx_n_s_gevent__util;
  PyObject *__pyx_n_s_gevent__waiter;
  PyObject *__pyx_n_s_gevent_event;
  PyObject *__pyx_n_s_gevent_exceptions;
  PyObject *__pyx_n_s_gevent_timeout;
  PyObject *__pyx_n_s_greenlet;
  PyObject *__pyx_n_s_greenlet_imported;
  PyObject *__pyx_n_s_greenlet_init;
  PyObject *__pyx_n_s_heapify;
  PyObject *__pyx_n_s_heapify_2;
  PyObject *__pyx_n_s_heappop;
  PyObject *__pyx_n_s_heappop_2;
  PyObject *__pyx_n_s_heappush;
  PyObject *__pyx_n_s_heappush_2;
  PyObject *__pyx_n_s_heapq;
  PyObject *__pyx_n_s_hex;
  PyObject *__pyx_n_s_hub;
  PyObject *__pyx_n_s_id;
  PyObject *__pyx_n_s_implements;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_s_import_c_accel;
  PyObject *__pyx_n_s_imports;
  PyObject *__pyx_n_s_init;
  PyObject *__pyx_n_s_init_2;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_item;
  PyObject *__pyx_n_s_items;
  PyObject *__pyx_n_s_join;
  PyObject *__pyx_n_s_lambda;
  PyObject *__pyx_n_s_loop;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_maxsize;
  PyObject *__pyx_n_s_maxsize_2;
  PyObject *__pyx_kp_s_maxsize_r;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_next;
  PyObject *__pyx_n_s_next_2;
  PyObject *__pyx_n_s_peek;
  PyObject *__pyx_n_s_peek_2;
  PyObject *__pyx_n_s_peek_nowait;
  PyObject *__pyx_n_s_pop;
  PyObject *__pyx_n_s_popleft;
  PyObject *__pyx_n_s_put;
  PyObject *__pyx_n_s_put_2;
  PyObject *__pyx_n_s_put_and_switch;
  PyObject *__pyx_n_s_put_nowait;
  PyObject *__pyx_n_s_putter;
  PyObject *__pyx_n_s_putters;
  PyObject *__pyx_kp_s_putters_s;
  PyObject *__pyx_kp_s_putters_s_2;
  PyObject *__pyx_n_s_pyx_capi;
  PyObject *__pyx_n_s_pyx_vtable;
  PyObject *__pyx_n_s_qsize;
  PyObject *__pyx_n_s_queue;
  PyObject *__pyx_n_s_queue_2;
  PyObject *__pyx_kp_s_queue_r;
  PyObject *__pyx_n_s_remove;
  PyObject *__pyx_n_s_repeat;
  PyObject *__pyx_n_s_result;
  PyObject *__pyx_n_s_run_callback;
  PyObject *__pyx_kp_s_s_at_s_s;
  PyObject *__pyx_kp_s_s_at_s_s_2;
  PyObject *__pyx_kp_s_s_s;
  PyObject *__pyx_kp_s_s_s_2;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_set;
  PyObject *__pyx_n_s_slots;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_kp_s_src_gevent_queue_py;
  PyObject *__pyx_n_s_stacklevel;
  PyObject *__pyx_n_s_start_new_or_dummy;
  PyObject *__pyx_n_s_switch;
  PyObject *__pyx_n_s_sys;
  PyObject *__pyx_n_s_task_done;
  PyObject *__pyx_kp_s_task_done_called_too_many_times;
  PyObject *__pyx_kp_s_tasks_s__cond_s;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_throw;
  PyObject *__pyx_n_s_timeout;
  PyObject *__pyx_n_s_unfinished_tasks;
  PyObject *__pyx_n_s_unlock;
  PyObject *__pyx_n_s_version_info;
  PyObject *__pyx_n_s_wait;
  PyObject *__pyx_n_s_waiter;
  PyObject *__pyx_n_s_waiter_2;
  PyObject *__pyx_n_s_warn;
  PyObject *__pyx_n_s_warn_depth;
  PyObject *__pyx_n_s_warnings;
  PyObject *__pyx_n_s_weakref;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_2;
  PyObject *__pyx_int_3;
  PyObject *__pyx_tuple__2;
  PyObject *__pyx_tuple__5;
  PyObject *__pyx_tuple__6;
  PyObject *__pyx_tuple__7;
  PyObject *__pyx_tuple__8;
  PyObject *__pyx_tuple__9;
  PyObject *__pyx_tuple__10;
  PyObject *__pyx_tuple__11;
  PyObject *__pyx_tuple__13;
  PyObject *__pyx_tuple__14;
  PyObject *__pyx_tuple__16;
  PyObject *__pyx_tuple__18;
  PyObject *__pyx_tuple__20;
  PyObject *__pyx_tuple__22;
  PyObject *__pyx_tuple__24;
  PyObject *__pyx_tuple__26;
  PyObject *__pyx_tuple__28;
  PyObject *__pyx_tuple__30;
  PyObject *__pyx_tuple__32;
  PyObject *__pyx_tuple__34;
  PyObject *__pyx_tuple__36;
  PyObject *__pyx_tuple__38;
  PyObject *__pyx_tuple__40;
  PyObject *__pyx_tuple__42;
  PyObject *__pyx_tuple__44;
  PyObject *__pyx_tuple__46;
  PyObject *__pyx_tuple__48;
  PyObject *__pyx_tuple__50;
  PyObject *__pyx_tuple__52;
  PyObject *__pyx_tuple__54;
  PyObject *__pyx_tuple__56;
  PyObject *__pyx_tuple__58;
  PyObject *__pyx_tuple__60;
  PyObject *__pyx_tuple__62;
  PyObject *__pyx_tuple__63;
  PyObject *__pyx_tuple__65;
  PyObject *__pyx_tuple__67;
  PyObject *__pyx_tuple__69;
  PyObject *__pyx_tuple__71;
  PyObject *__pyx_tuple__73;
  PyObject *__pyx_tuple__74;
  PyObject *__pyx_tuple__76;
  PyObject *__pyx_tuple__78;
  PyObject *__pyx_tuple__80;
  PyObject *__pyx_tuple__82;
  PyObject *__pyx_tuple__84;
  PyObject *__pyx_tuple__86;
  PyObject *__pyx_tuple__88;
  PyObject *__pyx_tuple__90;
  PyObject *__pyx_codeobj__12;
  PyObject *__pyx_codeobj__15;
  PyObject *__pyx_codeobj__17;
  PyObject *__pyx_codeobj__19;
  PyObject *__pyx_codeobj__21;
  PyObject *__pyx_codeobj__23;
  PyObject *__pyx_codeobj__25;
  PyObject *__pyx_codeobj__27;
  PyObject *__pyx_codeobj__29;
  PyObject *__pyx_codeobj__31;
  PyObject *__pyx_codeobj__33;
  PyObject *__pyx_codeobj__35;
  PyObject *__pyx_codeobj__37;
  PyObject *__pyx_codeobj__39;
  PyObject *__pyx_codeobj__41;
  PyObject *__pyx_codeobj__43;
  PyObject *__pyx_codeobj__45;
  PyObject *__pyx_codeobj__47;
  PyObject *__pyx_codeobj__49;
  PyObject *__pyx_codeobj__51;
  PyObject *__pyx_codeobj__53;
  PyObject *__pyx_codeobj__55;
  PyObject *__pyx_codeobj__57;
  PyObject *__pyx_codeobj__59;
  PyObject *__pyx_codeobj__61;
  PyObject *__pyx_codeobj__64;
  PyObject *__pyx_codeobj__66;
  PyObject *__pyx_codeobj__68;
  PyObject *__pyx_codeobj__70;
  PyObject *__pyx_codeobj__72;
  PyObject *__pyx_codeobj__75;
  PyObject *__pyx_codeobj__77;
  PyObject *__pyx_codeobj__79;
  PyObject *__pyx_codeobj__81;
  PyObject *__pyx_codeobj__83;
  PyObject *__pyx_codeobj__85;
  PyObject *__pyx_codeobj__87;
  PyObject *__pyx_codeobj__89;
  PyObject *__pyx_codeobj__91;
  PyObject *__pyx_codeobj__92;
} __pyx_mstate;

#ifdef __cplusplus
namespace {
  extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_greenlet);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_16_gevent_c_waiter_greenlet);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_greenlet);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cevent_Event);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cevent_AsyncResult);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_greenlet);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_Queue);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_14_gevent_cqueue_Queue);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_14_gevent_cqueue_LifoQueue);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue);
  Py_CLEAR(clear_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_Channel);
  Py_CLEAR(clear_module_state->__pyx_type_6gevent_14_gevent_cqueue_Channel);
  Py_CLEAR(clear_module_state->__pyx_n_s_);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel__format);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel__unlock);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel_empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel_full);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel_get);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel_get_nowait);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel_put);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel_put_nowait);
  Py_CLEAR(clear_module_state->__pyx_n_s_Channel_qsize);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Channels_have_a_maxsize_of_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_DeprecationWarning);
  Py_CLEAR(clear_module_state->__pyx_n_s_Empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_Empty_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Event);
  Py_CLEAR(clear_module_state->__pyx_n_s_Full);
  Py_CLEAR(clear_module_state->__pyx_n_s_Full_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_InvalidSwitchError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Invalid_switch_into_Channel_put);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Invalid_switch_into_Queue_get_r);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Invalid_switch_into_Queue_put_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_ItemWaiter);
  Py_CLEAR(clear_module_state->__pyx_n_s_ItemWaiter_put_and_switch);
  Py_CLEAR(clear_module_state->__pyx_n_s_JoinableQueue);
  Py_CLEAR(clear_module_state->__pyx_n_s_JoinableQueue__format);
  Py_CLEAR(clear_module_state->__pyx_n_s_JoinableQueue__put);
  Py_CLEAR(clear_module_state->__pyx_n_s_JoinableQueue_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_JoinableQueue_join);
  Py_CLEAR(clear_module_state->__pyx_n_s_JoinableQueue_task_done);
  Py_CLEAR(clear_module_state->__pyx_n_s_LifoQueue);
  Py_CLEAR(clear_module_state->__pyx_n_s_LifoQueue__create_queue);
  Py_CLEAR(clear_module_state->__pyx_n_s_LifoQueue__get);
  Py_CLEAR(clear_module_state->__pyx_n_s_LifoQueue__peek);
  Py_CLEAR(clear_module_state->__pyx_n_s_LifoQueue__put);
  Py_CLEAR(clear_module_state->__pyx_n_s_PriorityQueue);
  Py_CLEAR(clear_module_state->__pyx_n_s_PriorityQueue__create_queue);
  Py_CLEAR(clear_module_state->__pyx_n_s_PriorityQueue__get);
  Py_CLEAR(clear_module_state->__pyx_n_s_PriorityQueue__put);
  Py_CLEAR(clear_module_state->__pyx_n_s_PySimpleQueue);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Queue_0_now_equivalent_to_Queue);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue__create_queue);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue__format);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue__get);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue__peek);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue__put);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue__unlock);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_full);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_get);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_get_nowait);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_peek);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_peek_nowait);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_put);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_put_nowait);
  Py_CLEAR(clear_module_state->__pyx_n_s_Queue_qsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_SimpleQueue);
  Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration);
  Py_CLEAR(clear_module_state->__pyx_n_s_Timeout);
  Py_CLEAR(clear_module_state->__pyx_n_s_UnboundQueue);
  Py_CLEAR(clear_module_state->__pyx_kp_s_UnboundQueue_has_no_maxsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_UnboundQueue_put);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Waiter);
  Py_CLEAR(clear_module_state->__pyx_kp_s__3);
  Py_CLEAR(clear_module_state->__pyx_kp_s__4);
  Py_CLEAR(clear_module_state->__pyx_n_s_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_block);
  Py_CLEAR(clear_module_state->__pyx_n_s_cancel);
  Py_CLEAR(clear_module_state->__pyx_n_s_clear);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_collections);
  Py_CLEAR(clear_module_state->__pyx_n_s_cond);
  Py_CLEAR(clear_module_state->__pyx_n_s_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_create_queue);
  Py_CLEAR(clear_module_state->__pyx_n_s_deque);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_event_unlock);
  Py_CLEAR(clear_module_state->__pyx_n_s_exc_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_extensions);
  Py_CLEAR(clear_module_state->__pyx_n_s_format);
  Py_CLEAR(clear_module_state->__pyx_n_s_full);
  Py_CLEAR(clear_module_state->__pyx_n_s_get);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_hub_noargs);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_nowait);
  Py_CLEAR(clear_module_state->__pyx_n_s_getcurrent);
  Py_CLEAR(clear_module_state->__pyx_n_s_getter);
  Py_CLEAR(clear_module_state->__pyx_n_s_getters);
  Py_CLEAR(clear_module_state->__pyx_kp_s_getters_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_getters_s_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_gevent);
  Py_CLEAR(clear_module_state->__pyx_n_s_gevent__gevent_cqueue);
  Py_CLEAR(clear_module_state->__pyx_n_s_gevent__hub_local);
  Py_CLEAR(clear_module_state->__pyx_kp_s_gevent__queue);
  Py_CLEAR(clear_module_state->__pyx_n_s_gevent__util);
  Py_CLEAR(clear_module_state->__pyx_n_s_gevent__waiter);
  Py_CLEAR(clear_module_state->__pyx_n_s_gevent_event);
  Py_CLEAR(clear_module_state->__pyx_n_s_gevent_exceptions);
  Py_CLEAR(clear_module_state->__pyx_n_s_gevent_timeout);
  Py_CLEAR(clear_module_state->__pyx_n_s_greenlet);
  Py_CLEAR(clear_module_state->__pyx_n_s_greenlet_imported);
  Py_CLEAR(clear_module_state->__pyx_n_s_greenlet_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_heapify);
  Py_CLEAR(clear_module_state->__pyx_n_s_heapify_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_heappop);
  Py_CLEAR(clear_module_state->__pyx_n_s_heappop_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_heappush);
  Py_CLEAR(clear_module_state->__pyx_n_s_heappush_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_heapq);
  Py_CLEAR(clear_module_state->__pyx_n_s_hex);
  Py_CLEAR(clear_module_state->__pyx_n_s_hub);
  Py_CLEAR(clear_module_state->__pyx_n_s_id);
  Py_CLEAR(clear_module_state->__pyx_n_s_implements);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_s_import_c_accel);
  Py_CLEAR(clear_module_state->__pyx_n_s_imports);
  Py_CLEAR(clear_module_state->__pyx_n_s_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_item);
  Py_CLEAR(clear_module_state->__pyx_n_s_items);
  Py_CLEAR(clear_module_state->__pyx_n_s_join);
  Py_CLEAR(clear_module_state->__pyx_n_s_lambda);
  Py_CLEAR(clear_module_state->__pyx_n_s_loop);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_maxsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_maxsize_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_maxsize_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_next);
  Py_CLEAR(clear_module_state->__pyx_n_s_next_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_peek);
  Py_CLEAR(clear_module_state->__pyx_n_s_peek_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_peek_nowait);
  Py_CLEAR(clear_module_state->__pyx_n_s_pop);
  Py_CLEAR(clear_module_state->__pyx_n_s_popleft);
  Py_CLEAR(clear_module_state->__pyx_n_s_put);
  Py_CLEAR(clear_module_state->__pyx_n_s_put_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_put_and_switch);
  Py_CLEAR(clear_module_state->__pyx_n_s_put_nowait);
  Py_CLEAR(clear_module_state->__pyx_n_s_putter);
  Py_CLEAR(clear_module_state->__pyx_n_s_putters);
  Py_CLEAR(clear_module_state->__pyx_kp_s_putters_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_putters_s_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_capi);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
  Py_CLEAR(clear_module_state->__pyx_n_s_qsize);
  Py_CLEAR(clear_module_state->__pyx_n_s_queue);
  Py_CLEAR(clear_module_state->__pyx_n_s_queue_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_queue_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_remove);
  Py_CLEAR(clear_module_state->__pyx_n_s_repeat);
  Py_CLEAR(clear_module_state->__pyx_n_s_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_run_callback);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_at_s_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_at_s_s_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_s_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_n_s_set);
  Py_CLEAR(clear_module_state->__pyx_n_s_slots);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_kp_s_src_gevent_queue_py);
  Py_CLEAR(clear_module_state->__pyx_n_s_stacklevel);
  Py_CLEAR(clear_module_state->__pyx_n_s_start_new_or_dummy);
  Py_CLEAR(clear_module_state->__pyx_n_s_switch);
  Py_CLEAR(clear_module_state->__pyx_n_s_sys);
  Py_CLEAR(clear_module_state->__pyx_n_s_task_done);
  Py_CLEAR(clear_module_state->__pyx_kp_s_task_done_called_too_many_times);
  Py_CLEAR(clear_module_state->__pyx_kp_s_tasks_s__cond_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_throw);
  Py_CLEAR(clear_module_state->__pyx_n_s_timeout);
  Py_CLEAR(clear_module_state->__pyx_n_s_unfinished_tasks);
  Py_CLEAR(clear_module_state->__pyx_n_s_unlock);
  Py_CLEAR(clear_module_state->__pyx_n_s_version_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_wait);
  Py_CLEAR(clear_module_state->__pyx_n_s_waiter);
  Py_CLEAR(clear_module_state->__pyx_n_s_waiter_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_warn);
  Py_CLEAR(clear_module_state->__pyx_n_s_warn_depth);
  Py_CLEAR(clear_module_state->__pyx_n_s_warnings);
  Py_CLEAR(clear_module_state->__pyx_n_s_weakref);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_2);
  Py_CLEAR(clear_module_state->__pyx_int_3);
  Py_CLEAR(clear_module_state->__pyx_tuple__2);
  Py_CLEAR(clear_module_state->__pyx_tuple__5);
  Py_CLEAR(clear_module_state->__pyx_tuple__6);
  Py_CLEAR(clear_module_state->__pyx_tuple__7);
  Py_CLEAR(clear_module_state->__pyx_tuple__8);
  Py_CLEAR(clear_module_state->__pyx_tuple__9);
  Py_CLEAR(clear_module_state->__pyx_tuple__10);
  Py_CLEAR(clear_module_state->__pyx_tuple__11);
  Py_CLEAR(clear_module_state->__pyx_tuple__13);
  Py_CLEAR(clear_module_state->__pyx_tuple__14);
  Py_CLEAR(clear_module_state->__pyx_tuple__16);
  Py_CLEAR(clear_module_state->__pyx_tuple__18);
  Py_CLEAR(clear_module_state->__pyx_tuple__20);
  Py_CLEAR(clear_module_state->__pyx_tuple__22);
  Py_CLEAR(clear_module_state->__pyx_tuple__24);
  Py_CLEAR(clear_module_state->__pyx_tuple__26);
  Py_CLEAR(clear_module_state->__pyx_tuple__28);
  Py_CLEAR(clear_module_state->__pyx_tuple__30);
  Py_CLEAR(clear_module_state->__pyx_tuple__32);
  Py_CLEAR(clear_module_state->__pyx_tuple__34);
  Py_CLEAR(clear_module_state->__pyx_tuple__36);
  Py_CLEAR(clear_module_state->__pyx_tuple__38);
  Py_CLEAR(clear_module_state->__pyx_tuple__40);
  Py_CLEAR(clear_module_state->__pyx_tuple__42);
  Py_CLEAR(clear_module_state->__pyx_tuple__44);
  Py_CLEAR(clear_module_state->__pyx_tuple__46);
  Py_CLEAR(clear_module_state->__pyx_tuple__48);
  Py_CLEAR(clear_module_state->__pyx_tuple__50);
  Py_CLEAR(clear_module_state->__pyx_tuple__52);
  Py_CLEAR(clear_module_state->__pyx_tuple__54);
  Py_CLEAR(clear_module_state->__pyx_tuple__56);
  Py_CLEAR(clear_module_state->__pyx_tuple__58);
  Py_CLEAR(clear_module_state->__pyx_tuple__60);
  Py_CLEAR(clear_module_state->__pyx_tuple__62);
  Py_CLEAR(clear_module_state->__pyx_tuple__63);
  Py_CLEAR(clear_module_state->__pyx_tuple__65);
  Py_CLEAR(clear_module_state->__pyx_tuple__67);
  Py_CLEAR(clear_module_state->__pyx_tuple__69);
  Py_CLEAR(clear_module_state->__pyx_tuple__71);
  Py_CLEAR(clear_module_state->__pyx_tuple__73);
  Py_CLEAR(clear_module_state->__pyx_tuple__74);
  Py_CLEAR(clear_module_state->__pyx_tuple__76);
  Py_CLEAR(clear_module_state->__pyx_tuple__78);
  Py_CLEAR(clear_module_state->__pyx_tuple__80);
  Py_CLEAR(clear_module_state->__pyx_tuple__82);
  Py_CLEAR(clear_module_state->__pyx_tuple__84);
  Py_CLEAR(clear_module_state->__pyx_tuple__86);
  Py_CLEAR(clear_module_state->__pyx_tuple__88);
  Py_CLEAR(clear_module_state->__pyx_tuple__90);
  Py_CLEAR(clear_module_state->__pyx_codeobj__12);
  Py_CLEAR(clear_module_state->__pyx_codeobj__15);
  Py_CLEAR(clear_module_state->__pyx_codeobj__17);
  Py_CLEAR(clear_module_state->__pyx_codeobj__19);
  Py_CLEAR(clear_module_state->__pyx_codeobj__21);
  Py_CLEAR(clear_module_state->__pyx_codeobj__23);
  Py_CLEAR(clear_module_state->__pyx_codeobj__25);
  Py_CLEAR(clear_module_state->__pyx_codeobj__27);
  Py_CLEAR(clear_module_state->__pyx_codeobj__29);
  Py_CLEAR(clear_module_state->__pyx_codeobj__31);
  Py_CLEAR(clear_module_state->__pyx_codeobj__33);
  Py_CLEAR(clear_module_state->__pyx_codeobj__35);
  Py_CLEAR(clear_module_state->__pyx_codeobj__37);
  Py_CLEAR(clear_module_state->__pyx_codeobj__39);
  Py_CLEAR(clear_module_state->__pyx_codeobj__41);
  Py_CLEAR(clear_module_state->__pyx_codeobj__43);
  Py_CLEAR(clear_module_state->__pyx_codeobj__45);
  Py_CLEAR(clear_module_state->__pyx_codeobj__47);
  Py_CLEAR(clear_module_state->__pyx_codeobj__49);
  Py_CLEAR(clear_module_state->__pyx_codeobj__51);
  Py_CLEAR(clear_module_state->__pyx_codeobj__53);
  Py_CLEAR(clear_module_state->__pyx_codeobj__55);
  Py_CLEAR(clear_module_state->__pyx_codeobj__57);
  Py_CLEAR(clear_module_state->__pyx_codeobj__59);
  Py_CLEAR(clear_module_state->__pyx_codeobj__61);
  Py_CLEAR(clear_module_state->__pyx_codeobj__64);
  Py_CLEAR(clear_module_state->__pyx_codeobj__66);
  Py_CLEAR(clear_module_state->__pyx_codeobj__68);
  Py_CLEAR(clear_module_state->__pyx_codeobj__70);
  Py_CLEAR(clear_module_state->__pyx_codeobj__72);
  Py_CLEAR(clear_module_state->__pyx_codeobj__75);
  Py_CLEAR(clear_module_state->__pyx_codeobj__77);
  Py_CLEAR(clear_module_state->__pyx_codeobj__79);
  Py_CLEAR(clear_module_state->__pyx_codeobj__81);
  Py_CLEAR(clear_module_state->__pyx_codeobj__83);
  Py_CLEAR(clear_module_state->__pyx_codeobj__85);
  Py_CLEAR(clear_module_state->__pyx_codeobj__87);
  Py_CLEAR(clear_module_state->__pyx_codeobj__89);
  Py_CLEAR(clear_module_state->__pyx_codeobj__91);
  Py_CLEAR(clear_module_state->__pyx_codeobj__92);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_greenlet);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_16_gevent_c_waiter_greenlet);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_greenlet);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cevent_Event);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cevent_AsyncResult);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_greenlet);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_Queue);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_14_gevent_cqueue_Queue);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_14_gevent_cqueue_LifoQueue);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue);
  Py_VISIT(traverse_module_state->__pyx_ptype_6gevent_14_gevent_cqueue_Channel);
  Py_VISIT(traverse_module_state->__pyx_type_6gevent_14_gevent_cqueue_Channel);
  Py_VISIT(traverse_module_state->__pyx_n_s_);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel__format);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel__unlock);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel_empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel_full);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel_get);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel_get_nowait);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel_put);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel_put_nowait);
  Py_VISIT(traverse_module_state->__pyx_n_s_Channel_qsize);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Channels_have_a_maxsize_of_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_DeprecationWarning);
  Py_VISIT(traverse_module_state->__pyx_n_s_Empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_Empty_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Event);
  Py_VISIT(traverse_module_state->__pyx_n_s_Full);
  Py_VISIT(traverse_module_state->__pyx_n_s_Full_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_InvalidSwitchError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Invalid_switch_into_Channel_put);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Invalid_switch_into_Queue_get_r);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Invalid_switch_into_Queue_put_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_ItemWaiter);
  Py_VISIT(traverse_module_state->__pyx_n_s_ItemWaiter_put_and_switch);
  Py_VISIT(traverse_module_state->__pyx_n_s_JoinableQueue);
  Py_VISIT(traverse_module_state->__pyx_n_s_JoinableQueue__format);
  Py_VISIT(traverse_module_state->__pyx_n_s_JoinableQueue__put);
  Py_VISIT(traverse_module_state->__pyx_n_s_JoinableQueue_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_JoinableQueue_join);
  Py_VISIT(traverse_module_state->__pyx_n_s_JoinableQueue_task_done);
  Py_VISIT(traverse_module_state->__pyx_n_s_LifoQueue);
  Py_VISIT(traverse_module_state->__pyx_n_s_LifoQueue__create_queue);
  Py_VISIT(traverse_module_state->__pyx_n_s_LifoQueue__get);
  Py_VISIT(traverse_module_state->__pyx_n_s_LifoQueue__peek);
  Py_VISIT(traverse_module_state->__pyx_n_s_LifoQueue__put);
  Py_VISIT(traverse_module_state->__pyx_n_s_PriorityQueue);
  Py_VISIT(traverse_module_state->__pyx_n_s_PriorityQueue__create_queue);
  Py_VISIT(traverse_module_state->__pyx_n_s_PriorityQueue__get);
  Py_VISIT(traverse_module_state->__pyx_n_s_PriorityQueue__put);
  Py_VISIT(traverse_module_state->__pyx_n_s_PySimpleQueue);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Queue_0_now_equivalent_to_Queue);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue__create_queue);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue__format);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue__get);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue__peek);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue__put);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue__unlock);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_full);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_get);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_get_nowait);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_peek);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_peek_nowait);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_put);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_put_nowait);
  Py_VISIT(traverse_module_state->__pyx_n_s_Queue_qsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_SimpleQueue);
  Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration);
  Py_VISIT(traverse_module_state->__pyx_n_s_Timeout);
  Py_VISIT(traverse_module_state->__pyx_n_s_UnboundQueue);
  Py_VISIT(traverse_module_state->__pyx_kp_s_UnboundQueue_has_no_maxsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_UnboundQueue_put);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Waiter);
  Py_VISIT(traverse_module_state->__pyx_kp_s__3);
  Py_VISIT(traverse_module_state->__pyx_kp_s__4);
  Py_VISIT(traverse_module_state->__pyx_n_s_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_block);
  Py_VISIT(traverse_module_state->__pyx_n_s_cancel);
  Py_VISIT(traverse_module_state->__pyx_n_s_clear);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_collections);
  Py_VISIT(traverse_module_state->__pyx_n_s_cond);
  Py_VISIT(traverse_module_state->__pyx_n_s_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_create_queue);
  Py_VISIT(traverse_module_state->__pyx_n_s_deque);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_event_unlock);
  Py_VISIT(traverse_module_state->__pyx_n_s_exc_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_extensions);
  Py_VISIT(traverse_module_state->__pyx_n_s_format);
  Py_VISIT(traverse_module_state->__pyx_n_s_full);
  Py_VISIT(traverse_module_state->__pyx_n_s_get);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_hub_noargs);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_nowait);
  Py_VISIT(traverse_module_state->__pyx_n_s_getcurrent);
  Py_VISIT(traverse_module_state->__pyx_n_s_getter);
  Py_VISIT(traverse_module_state->__pyx_n_s_getters);
  Py_VISIT(traverse_module_state->__pyx_kp_s_getters_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_getters_s_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_gevent);
  Py_VISIT(traverse_module_state->__pyx_n_s_gevent__gevent_cqueue);
  Py_VISIT(traverse_module_state->__pyx_n_s_gevent__hub_local);
  Py_VISIT(traverse_module_state->__pyx_kp_s_gevent__queue);
  Py_VISIT(traverse_module_state->__pyx_n_s_gevent__util);
  Py_VISIT(traverse_module_state->__pyx_n_s_gevent__waiter);
  Py_VISIT(traverse_module_state->__pyx_n_s_gevent_event);
  Py_VISIT(traverse_module_state->__pyx_n_s_gevent_exceptions);
  Py_VISIT(traverse_module_state->__pyx_n_s_gevent_timeout);
  Py_VISIT(traverse_module_state->__pyx_n_s_greenlet);
  Py_VISIT(traverse_module_state->__pyx_n_s_greenlet_imported);
  Py_VISIT(traverse_module_state->__pyx_n_s_greenlet_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_heapify);
  Py_VISIT(traverse_module_state->__pyx_n_s_heapify_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_heappop);
  Py_VISIT(traverse_module_state->__pyx_n_s_heappop_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_heappush);
  Py_VISIT(traverse_module_state->__pyx_n_s_heappush_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_heapq);
  Py_VISIT(traverse_module_state->__pyx_n_s_hex);
  Py_VISIT(traverse_module_state->__pyx_n_s_hub);
  Py_VISIT(traverse_module_state->__pyx_n_s_id);
  Py_VISIT(traverse_module_state->__pyx_n_s_implements);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_s_import_c_accel);
  Py_VISIT(traverse_module_state->__pyx_n_s_imports);
  Py_VISIT(traverse_module_state->__pyx_n_s_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_item);
  Py_VISIT(traverse_module_state->__pyx_n_s_items);
  Py_VISIT(traverse_module_state->__pyx_n_s_join);
  Py_VISIT(traverse_module_state->__pyx_n_s_lambda);
  Py_VISIT(traverse_module_state->__pyx_n_s_loop);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_maxsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_maxsize_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_maxsize_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_next);
  Py_VISIT(traverse_module_state->__pyx_n_s_next_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_peek);
  Py_VISIT(traverse_module_state->__pyx_n_s_peek_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_peek_nowait);
  Py_VISIT(traverse_module_state->__pyx_n_s_pop);
  Py_VISIT(traverse_module_state->__pyx_n_s_popleft);
  Py_VISIT(traverse_module_state->__pyx_n_s_put);
  Py_VISIT(traverse_module_state->__pyx_n_s_put_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_put_and_switch);
  Py_VISIT(traverse_module_state->__pyx_n_s_put_nowait);
  Py_VISIT(traverse_module_state->__pyx_n_s_putter);
  Py_VISIT(traverse_module_state->__pyx_n_s_putters);
  Py_VISIT(traverse_module_state->__pyx_kp_s_putters_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_putters_s_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_capi);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
  Py_VISIT(traverse_module_state->__pyx_n_s_qsize);
  Py_VISIT(traverse_module_state->__pyx_n_s_queue);
  Py_VISIT(traverse_module_state->__pyx_n_s_queue_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_queue_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_remove);
  Py_VISIT(traverse_module_state->__pyx_n_s_repeat);
  Py_VISIT(traverse_module_state->__pyx_n_s_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_run_callback);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_at_s_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_at_s_s_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_s_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_n_s_set);
  Py_VISIT(traverse_module_state->__pyx_n_s_slots);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_kp_s_src_gevent_queue_py);
  Py_VISIT(traverse_module_state->__pyx_n_s_stacklevel);
  Py_VISIT(traverse_module_state->__pyx_n_s_start_new_or_dummy);
  Py_VISIT(traverse_module_state->__pyx_n_s_switch);
  Py_VISIT(traverse_module_state->__pyx_n_s_sys);
  Py_VISIT(traverse_module_state->__pyx_n_s_task_done);
  Py_VISIT(traverse_module_state->__pyx_kp_s_task_done_called_too_many_times);
  Py_VISIT(traverse_module_state->__pyx_kp_s_tasks_s__cond_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_throw);
  Py_VISIT(traverse_module_state->__pyx_n_s_timeout);
  Py_VISIT(traverse_module_state->__pyx_n_s_unfinished_tasks);
  Py_VISIT(traverse_module_state->__pyx_n_s_unlock);
  Py_VISIT(traverse_module_state->__pyx_n_s_version_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_wait);
  Py_VISIT(traverse_module_state->__pyx_n_s_waiter);
  Py_VISIT(traverse_module_state->__pyx_n_s_waiter_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_warn);
  Py_VISIT(traverse_module_state->__pyx_n_s_warn_depth);
  Py_VISIT(traverse_module_state->__pyx_n_s_warnings);
  Py_VISIT(traverse_module_state->__pyx_n_s_weakref);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_2);
  Py_VISIT(traverse_module_state->__pyx_int_3);
  Py_VISIT(traverse_module_state->__pyx_tuple__2);
  Py_VISIT(traverse_module_state->__pyx_tuple__5);
  Py_VISIT(traverse_module_state->__pyx_tuple__6);
  Py_VISIT(traverse_module_state->__pyx_tuple__7);
  Py_VISIT(traverse_module_state->__pyx_tuple__8);
  Py_VISIT(traverse_module_state->__pyx_tuple__9);
  Py_VISIT(traverse_module_state->__pyx_tuple__10);
  Py_VISIT(traverse_module_state->__pyx_tuple__11);
  Py_VISIT(traverse_module_state->__pyx_tuple__13);
  Py_VISIT(traverse_module_state->__pyx_tuple__14);
  Py_VISIT(traverse_module_state->__pyx_tuple__16);
  Py_VISIT(traverse_module_state->__pyx_tuple__18);
  Py_VISIT(traverse_module_state->__pyx_tuple__20);
  Py_VISIT(traverse_module_state->__pyx_tuple__22);
  Py_VISIT(traverse_module_state->__pyx_tuple__24);
  Py_VISIT(traverse_module_state->__pyx_tuple__26);
  Py_VISIT(traverse_module_state->__pyx_tuple__28);
  Py_VISIT(traverse_module_state->__pyx_tuple__30);
  Py_VISIT(traverse_module_state->__pyx_tuple__32);
  Py_VISIT(traverse_module_state->__pyx_tuple__34);
  Py_VISIT(traverse_module_state->__pyx_tuple__36);
  Py_VISIT(traverse_module_state->__pyx_tuple__38);
  Py_VISIT(traverse_module_state->__pyx_tuple__40);
  Py_VISIT(traverse_module_state->__pyx_tuple__42);
  Py_VISIT(traverse_module_state->__pyx_tuple__44);
  Py_VISIT(traverse_module_state->__pyx_tuple__46);
  Py_VISIT(traverse_module_state->__pyx_tuple__48);
  Py_VISIT(traverse_module_state->__pyx_tuple__50);
  Py_VISIT(traverse_module_state->__pyx_tuple__52);
  Py_VISIT(traverse_module_state->__pyx_tuple__54);
  Py_VISIT(traverse_module_state->__pyx_tuple__56);
  Py_VISIT(traverse_module_state->__pyx_tuple__58);
  Py_VISIT(traverse_module_state->__pyx_tuple__60);
  Py_VISIT(traverse_module_state->__pyx_tuple__62);
  Py_VISIT(traverse_module_state->__pyx_tuple__63);
  Py_VISIT(traverse_module_state->__pyx_tuple__65);
  Py_VISIT(traverse_module_state->__pyx_tuple__67);
  Py_VISIT(traverse_module_state->__pyx_tuple__69);
  Py_VISIT(traverse_module_state->__pyx_tuple__71);
  Py_VISIT(traverse_module_state->__pyx_tuple__73);
  Py_VISIT(traverse_module_state->__pyx_tuple__74);
  Py_VISIT(traverse_module_state->__pyx_tuple__76);
  Py_VISIT(traverse_module_state->__pyx_tuple__78);
  Py_VISIT(traverse_module_state->__pyx_tuple__80);
  Py_VISIT(traverse_module_state->__pyx_tuple__82);
  Py_VISIT(traverse_module_state->__pyx_tuple__84);
  Py_VISIT(traverse_module_state->__pyx_tuple__86);
  Py_VISIT(traverse_module_state->__pyx_tuple__88);
  Py_VISIT(traverse_module_state->__pyx_tuple__90);
  Py_VISIT(traverse_module_state->__pyx_codeobj__12);
  Py_VISIT(traverse_module_state->__pyx_codeobj__15);
  Py_VISIT(traverse_module_state->__pyx_codeobj__17);
  Py_VISIT(traverse_module_state->__pyx_codeobj__19);
  Py_VISIT(traverse_module_state->__pyx_codeobj__21);
  Py_VISIT(traverse_module_state->__pyx_codeobj__23);
  Py_VISIT(traverse_module_state->__pyx_codeobj__25);
  Py_VISIT(traverse_module_state->__pyx_codeobj__27);
  Py_VISIT(traverse_module_state->__pyx_codeobj__29);
  Py_VISIT(traverse_module_state->__pyx_codeobj__31);
  Py_VISIT(traverse_module_state->__pyx_codeobj__33);
  Py_VISIT(traverse_module_state->__pyx_codeobj__35);
  Py_VISIT(traverse_module_state->__pyx_codeobj__37);
  Py_VISIT(traverse_module_state->__pyx_codeobj__39);
  Py_VISIT(traverse_module_state->__pyx_codeobj__41);
  Py_VISIT(traverse_module_state->__pyx_codeobj__43);
  Py_VISIT(traverse_module_state->__pyx_codeobj__45);
  Py_VISIT(traverse_module_state->__pyx_codeobj__47);
  Py_VISIT(traverse_module_state->__pyx_codeobj__49);
  Py_VISIT(traverse_module_state->__pyx_codeobj__51);
  Py_VISIT(traverse_module_state->__pyx_codeobj__53);
  Py_VISIT(traverse_module_state->__pyx_codeobj__55);
  Py_VISIT(traverse_module_state->__pyx_codeobj__57);
  Py_VISIT(traverse_module_state->__pyx_codeobj__59);
  Py_VISIT(traverse_module_state->__pyx_codeobj__61);
  Py_VISIT(traverse_module_state->__pyx_codeobj__64);
  Py_VISIT(traverse_module_state->__pyx_codeobj__66);
  Py_VISIT(traverse_module_state->__pyx_codeobj__68);
  Py_VISIT(traverse_module_state->__pyx_codeobj__70);
  Py_VISIT(traverse_module_state->__pyx_codeobj__72);
  Py_VISIT(traverse_module_state->__pyx_codeobj__75);
  Py_VISIT(traverse_module_state->__pyx_codeobj__77);
  Py_VISIT(traverse_module_state->__pyx_codeobj__79);
  Py_VISIT(traverse_module_state->__pyx_codeobj__81);
  Py_VISIT(traverse_module_state->__pyx_codeobj__83);
  Py_VISIT(traverse_module_state->__pyx_codeobj__85);
  Py_VISIT(traverse_module_state->__pyx_codeobj__87);
  Py_VISIT(traverse_module_state->__pyx_codeobj__89);
  Py_VISIT(traverse_module_state->__pyx_codeobj__91);
  Py_VISIT(traverse_module_state->__pyx_codeobj__92);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#if CYTHON_COMPILING_IN_LIMITED_API
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#define __pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_greenlet __pyx_mstate_global->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_greenlet
#define __pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet __pyx_mstate_global->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet
#define __pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop __pyx_mstate_global->__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop
#define __pyx_ptype_6gevent_16_gevent_c_waiter_greenlet __pyx_mstate_global->__pyx_ptype_6gevent_16_gevent_c_waiter_greenlet
#define __pyx_ptype_6gevent_16_gevent_c_waiter_Waiter __pyx_mstate_global->__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter
#define __pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter __pyx_mstate_global->__pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter
#define __pyx_ptype_6gevent_27_gevent_c_abstract_linkable_greenlet __pyx_mstate_global->__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_greenlet
#define __pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable __pyx_mstate_global->__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable
#define __pyx_ptype_6gevent_14_gevent_cevent_Event __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cevent_Event
#define __pyx_ptype_6gevent_14_gevent_cevent_AsyncResult __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cevent_AsyncResult
#define __pyx_ptype_6gevent_14_gevent_cqueue_greenlet __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cqueue_greenlet
#define __pyx_ptype_6gevent_14_gevent_cqueue_Queue __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cqueue_Queue
#define __pyx_type_6gevent_14_gevent_cqueue_Queue __pyx_mstate_global->__pyx_type_6gevent_14_gevent_cqueue_Queue
#define __pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter
#define __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter __pyx_mstate_global->__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter
#define __pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue
#define __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue __pyx_mstate_global->__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue
#define __pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue
#define __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue __pyx_mstate_global->__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue
#define __pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue
#define __pyx_type_6gevent_14_gevent_cqueue_LifoQueue __pyx_mstate_global->__pyx_type_6gevent_14_gevent_cqueue_LifoQueue
#define __pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue
#define __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue __pyx_mstate_global->__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue
#define __pyx_ptype_6gevent_14_gevent_cqueue_Channel __pyx_mstate_global->__pyx_ptype_6gevent_14_gevent_cqueue_Channel
#define __pyx_type_6gevent_14_gevent_cqueue_Channel __pyx_mstate_global->__pyx_type_6gevent_14_gevent_cqueue_Channel
#define __pyx_n_s_ __pyx_mstate_global->__pyx_n_s_
#define __pyx_n_s_Channel __pyx_mstate_global->__pyx_n_s_Channel
#define __pyx_n_s_Channel__format __pyx_mstate_global->__pyx_n_s_Channel__format
#define __pyx_n_s_Channel__unlock __pyx_mstate_global->__pyx_n_s_Channel__unlock
#define __pyx_n_s_Channel_empty __pyx_mstate_global->__pyx_n_s_Channel_empty
#define __pyx_n_s_Channel_full __pyx_mstate_global->__pyx_n_s_Channel_full
#define __pyx_n_s_Channel_get __pyx_mstate_global->__pyx_n_s_Channel_get
#define __pyx_n_s_Channel_get_nowait __pyx_mstate_global->__pyx_n_s_Channel_get_nowait
#define __pyx_n_s_Channel_put __pyx_mstate_global->__pyx_n_s_Channel_put
#define __pyx_n_s_Channel_put_nowait __pyx_mstate_global->__pyx_n_s_Channel_put_nowait
#define __pyx_n_s_Channel_qsize __pyx_mstate_global->__pyx_n_s_Channel_qsize
#define __pyx_kp_s_Channels_have_a_maxsize_of_1 __pyx_mstate_global->__pyx_kp_s_Channels_have_a_maxsize_of_1
#define __pyx_n_s_DeprecationWarning __pyx_mstate_global->__pyx_n_s_DeprecationWarning
#define __pyx_n_s_Empty __pyx_mstate_global->__pyx_n_s_Empty
#define __pyx_n_s_Empty_2 __pyx_mstate_global->__pyx_n_s_Empty_2
#define __pyx_n_s_Event __pyx_mstate_global->__pyx_n_s_Event
#define __pyx_n_s_Full __pyx_mstate_global->__pyx_n_s_Full
#define __pyx_n_s_Full_2 __pyx_mstate_global->__pyx_n_s_Full_2
#define __pyx_n_s_InvalidSwitchError __pyx_mstate_global->__pyx_n_s_InvalidSwitchError
#define __pyx_kp_s_Invalid_switch_into_Channel_put __pyx_mstate_global->__pyx_kp_s_Invalid_switch_into_Channel_put
#define __pyx_kp_s_Invalid_switch_into_Queue_get_r __pyx_mstate_global->__pyx_kp_s_Invalid_switch_into_Queue_get_r
#define __pyx_kp_s_Invalid_switch_into_Queue_put_r __pyx_mstate_global->__pyx_kp_s_Invalid_switch_into_Queue_put_r
#define __pyx_n_s_ItemWaiter __pyx_mstate_global->__pyx_n_s_ItemWaiter
#define __pyx_n_s_ItemWaiter_put_and_switch __pyx_mstate_global->__pyx_n_s_ItemWaiter_put_and_switch
#define __pyx_n_s_JoinableQueue __pyx_mstate_global->__pyx_n_s_JoinableQueue
#define __pyx_n_s_JoinableQueue__format __pyx_mstate_global->__pyx_n_s_JoinableQueue__format
#define __pyx_n_s_JoinableQueue__put __pyx_mstate_global->__pyx_n_s_JoinableQueue__put
#define __pyx_n_s_JoinableQueue_copy __pyx_mstate_global->__pyx_n_s_JoinableQueue_copy
#define __pyx_n_s_JoinableQueue_join __pyx_mstate_global->__pyx_n_s_JoinableQueue_join
#define __pyx_n_s_JoinableQueue_task_done __pyx_mstate_global->__pyx_n_s_JoinableQueue_task_done
#define __pyx_n_s_LifoQueue __pyx_mstate_global->__pyx_n_s_LifoQueue
#define __pyx_n_s_LifoQueue__create_queue __pyx_mstate_global->__pyx_n_s_LifoQueue__create_queue
#define __pyx_n_s_LifoQueue__get __pyx_mstate_global->__pyx_n_s_LifoQueue__get
#define __pyx_n_s_LifoQueue__peek __pyx_mstate_global->__pyx_n_s_LifoQueue__peek
#define __pyx_n_s_LifoQueue__put __pyx_mstate_global->__pyx_n_s_LifoQueue__put
#define __pyx_n_s_PriorityQueue __pyx_mstate_global->__pyx_n_s_PriorityQueue
#define __pyx_n_s_PriorityQueue__create_queue __pyx_mstate_global->__pyx_n_s_PriorityQueue__create_queue
#define __pyx_n_s_PriorityQueue__get __pyx_mstate_global->__pyx_n_s_PriorityQueue__get
#define __pyx_n_s_PriorityQueue__put __pyx_mstate_global->__pyx_n_s_PriorityQueue__put
#define __pyx_n_s_PySimpleQueue __pyx_mstate_global->__pyx_n_s_PySimpleQueue
#define __pyx_n_s_Queue __pyx_mstate_global->__pyx_n_s_Queue
#define __pyx_kp_s_Queue_0_now_equivalent_to_Queue __pyx_mstate_global->__pyx_kp_s_Queue_0_now_equivalent_to_Queue
#define __pyx_n_s_Queue__create_queue __pyx_mstate_global->__pyx_n_s_Queue__create_queue
#define __pyx_n_s_Queue__format __pyx_mstate_global->__pyx_n_s_Queue__format
#define __pyx_n_s_Queue__get __pyx_mstate_global->__pyx_n_s_Queue__get
#define __pyx_n_s_Queue__peek __pyx_mstate_global->__pyx_n_s_Queue__peek
#define __pyx_n_s_Queue__put __pyx_mstate_global->__pyx_n_s_Queue__put
#define __pyx_n_s_Queue__unlock __pyx_mstate_global->__pyx_n_s_Queue__unlock
#define __pyx_n_s_Queue_copy __pyx_mstate_global->__pyx_n_s_Queue_copy
#define __pyx_n_s_Queue_empty __pyx_mstate_global->__pyx_n_s_Queue_empty
#define __pyx_n_s_Queue_full __pyx_mstate_global->__pyx_n_s_Queue_full
#define __pyx_n_s_Queue_get __pyx_mstate_global->__pyx_n_s_Queue_get
#define __pyx_n_s_Queue_get_nowait __pyx_mstate_global->__pyx_n_s_Queue_get_nowait
#define __pyx_n_s_Queue_peek __pyx_mstate_global->__pyx_n_s_Queue_peek
#define __pyx_n_s_Queue_peek_nowait __pyx_mstate_global->__pyx_n_s_Queue_peek_nowait
#define __pyx_n_s_Queue_put __pyx_mstate_global->__pyx_n_s_Queue_put
#define __pyx_n_s_Queue_put_nowait __pyx_mstate_global->__pyx_n_s_Queue_put_nowait
#define __pyx_n_s_Queue_qsize __pyx_mstate_global->__pyx_n_s_Queue_qsize
#define __pyx_n_s_SimpleQueue __pyx_mstate_global->__pyx_n_s_SimpleQueue
#define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration
#define __pyx_n_s_Timeout __pyx_mstate_global->__pyx_n_s_Timeout
#define __pyx_n_s_UnboundQueue __pyx_mstate_global->__pyx_n_s_UnboundQueue
#define __pyx_kp_s_UnboundQueue_has_no_maxsize __pyx_mstate_global->__pyx_kp_s_UnboundQueue_has_no_maxsize
#define __pyx_n_s_UnboundQueue_put __pyx_mstate_global->__pyx_n_s_UnboundQueue_put
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_Waiter __pyx_mstate_global->__pyx_n_s_Waiter
#define __pyx_kp_s__3 __pyx_mstate_global->__pyx_kp_s__3
#define __pyx_kp_s__4 __pyx_mstate_global->__pyx_kp_s__4
#define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
#define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append
#define __pyx_n_s_block __pyx_mstate_global->__pyx_n_s_block
#define __pyx_n_s_cancel __pyx_mstate_global->__pyx_n_s_cancel
#define __pyx_n_s_clear __pyx_mstate_global->__pyx_n_s_clear
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
#define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
#define __pyx_n_s_cond __pyx_mstate_global->__pyx_n_s_cond
#define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
#define __pyx_n_s_create_queue __pyx_mstate_global->__pyx_n_s_create_queue
#define __pyx_n_s_deque __pyx_mstate_global->__pyx_n_s_deque
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
#define __pyx_n_s_event_unlock __pyx_mstate_global->__pyx_n_s_event_unlock
#define __pyx_n_s_exc_info __pyx_mstate_global->__pyx_n_s_exc_info
#define __pyx_n_s_extensions __pyx_mstate_global->__pyx_n_s_extensions
#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
#define __pyx_n_s_full __pyx_mstate_global->__pyx_n_s_full
#define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
#define __pyx_n_s_get_2 __pyx_mstate_global->__pyx_n_s_get_2
#define __pyx_n_s_get_hub_noargs __pyx_mstate_global->__pyx_n_s_get_hub_noargs
#define __pyx_n_s_get_nowait __pyx_mstate_global->__pyx_n_s_get_nowait
#define __pyx_n_s_getcurrent __pyx_mstate_global->__pyx_n_s_getcurrent
#define __pyx_n_s_getter __pyx_mstate_global->__pyx_n_s_getter
#define __pyx_n_s_getters __pyx_mstate_global->__pyx_n_s_getters
#define __pyx_kp_s_getters_s __pyx_mstate_global->__pyx_kp_s_getters_s
#define __pyx_kp_s_getters_s_2 __pyx_mstate_global->__pyx_kp_s_getters_s_2
#define __pyx_n_s_gevent __pyx_mstate_global->__pyx_n_s_gevent
#define __pyx_n_s_gevent__gevent_cqueue __pyx_mstate_global->__pyx_n_s_gevent__gevent_cqueue
#define __pyx_n_s_gevent__hub_local __pyx_mstate_global->__pyx_n_s_gevent__hub_local
#define __pyx_kp_s_gevent__queue __pyx_mstate_global->__pyx_kp_s_gevent__queue
#define __pyx_n_s_gevent__util __pyx_mstate_global->__pyx_n_s_gevent__util
#define __pyx_n_s_gevent__waiter __pyx_mstate_global->__pyx_n_s_gevent__waiter
#define __pyx_n_s_gevent_event __pyx_mstate_global->__pyx_n_s_gevent_event
#define __pyx_n_s_gevent_exceptions __pyx_mstate_global->__pyx_n_s_gevent_exceptions
#define __pyx_n_s_gevent_timeout __pyx_mstate_global->__pyx_n_s_gevent_timeout
#define __pyx_n_s_greenlet __pyx_mstate_global->__pyx_n_s_greenlet
#define __pyx_n_s_greenlet_imported __pyx_mstate_global->__pyx_n_s_greenlet_imported
#define __pyx_n_s_greenlet_init __pyx_mstate_global->__pyx_n_s_greenlet_init
#define __pyx_n_s_heapify __pyx_mstate_global->__pyx_n_s_heapify
#define __pyx_n_s_heapify_2 __pyx_mstate_global->__pyx_n_s_heapify_2
#define __pyx_n_s_heappop __pyx_mstate_global->__pyx_n_s_heappop
#define __pyx_n_s_heappop_2 __pyx_mstate_global->__pyx_n_s_heappop_2
#define __pyx_n_s_heappush __pyx_mstate_global->__pyx_n_s_heappush
#define __pyx_n_s_heappush_2 __pyx_mstate_global->__pyx_n_s_heappush_2
#define __pyx_n_s_heapq __pyx_mstate_global->__pyx_n_s_heapq
#define __pyx_n_s_hex __pyx_mstate_global->__pyx_n_s_hex
#define __pyx_n_s_hub __pyx_mstate_global->__pyx_n_s_hub
#define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
#define __pyx_n_s_implements __pyx_mstate_global->__pyx_n_s_implements
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_s_import_c_accel __pyx_mstate_global->__pyx_n_s_import_c_accel
#define __pyx_n_s_imports __pyx_mstate_global->__pyx_n_s_imports
#define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
#define __pyx_n_s_init_2 __pyx_mstate_global->__pyx_n_s_init_2
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_item __pyx_mstate_global->__pyx_n_s_item
#define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items
#define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join
#define __pyx_n_s_lambda __pyx_mstate_global->__pyx_n_s_lambda
#define __pyx_n_s_loop __pyx_mstate_global->__pyx_n_s_loop
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_maxsize __pyx_mstate_global->__pyx_n_s_maxsize
#define __pyx_n_s_maxsize_2 __pyx_mstate_global->__pyx_n_s_maxsize_2
#define __pyx_kp_s_maxsize_r __pyx_mstate_global->__pyx_kp_s_maxsize_r
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_next __pyx_mstate_global->__pyx_n_s_next
#define __pyx_n_s_next_2 __pyx_mstate_global->__pyx_n_s_next_2
#define __pyx_n_s_peek __pyx_mstate_global->__pyx_n_s_peek
#define __pyx_n_s_peek_2 __pyx_mstate_global->__pyx_n_s_peek_2
#define __pyx_n_s_peek_nowait __pyx_mstate_global->__pyx_n_s_peek_nowait
#define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop
#define __pyx_n_s_popleft __pyx_mstate_global->__pyx_n_s_popleft
#define __pyx_n_s_put __pyx_mstate_global->__pyx_n_s_put
#define __pyx_n_s_put_2 __pyx_mstate_global->__pyx_n_s_put_2
#define __pyx_n_s_put_and_switch __pyx_mstate_global->__pyx_n_s_put_and_switch
#define __pyx_n_s_put_nowait __pyx_mstate_global->__pyx_n_s_put_nowait
#define __pyx_n_s_putter __pyx_mstate_global->__pyx_n_s_putter
#define __pyx_n_s_putters __pyx_mstate_global->__pyx_n_s_putters
#define __pyx_kp_s_putters_s __pyx_mstate_global->__pyx_kp_s_putters_s
#define __pyx_kp_s_putters_s_2 __pyx_mstate_global->__pyx_kp_s_putters_s_2
#define __pyx_n_s_pyx_capi __pyx_mstate_global->__pyx_n_s_pyx_capi
#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
#define __pyx_n_s_qsize __pyx_mstate_global->__pyx_n_s_qsize
#define __pyx_n_s_queue __pyx_mstate_global->__pyx_n_s_queue
#define __pyx_n_s_queue_2 __pyx_mstate_global->__pyx_n_s_queue_2
#define __pyx_kp_s_queue_r __pyx_mstate_global->__pyx_kp_s_queue_r
#define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove
#define __pyx_n_s_repeat __pyx_mstate_global->__pyx_n_s_repeat
#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
#define __pyx_n_s_run_callback __pyx_mstate_global->__pyx_n_s_run_callback
#define __pyx_kp_s_s_at_s_s __pyx_mstate_global->__pyx_kp_s_s_at_s_s
#define __pyx_kp_s_s_at_s_s_2 __pyx_mstate_global->__pyx_kp_s_s_at_s_s_2
#define __pyx_kp_s_s_s __pyx_mstate_global->__pyx_kp_s_s_s
#define __pyx_kp_s_s_s_2 __pyx_mstate_global->__pyx_kp_s_s_s_2
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_n_s_set __pyx_mstate_global->__pyx_n_s_set
#define __pyx_n_s_slots __pyx_mstate_global->__pyx_n_s_slots
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_kp_s_src_gevent_queue_py __pyx_mstate_global->__pyx_kp_s_src_gevent_queue_py
#define __pyx_n_s_stacklevel __pyx_mstate_global->__pyx_n_s_stacklevel
#define __pyx_n_s_start_new_or_dummy __pyx_mstate_global->__pyx_n_s_start_new_or_dummy
#define __pyx_n_s_switch __pyx_mstate_global->__pyx_n_s_switch
#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
#define __pyx_n_s_task_done __pyx_mstate_global->__pyx_n_s_task_done
#define __pyx_kp_s_task_done_called_too_many_times __pyx_mstate_global->__pyx_kp_s_task_done_called_too_many_times
#define __pyx_kp_s_tasks_s__cond_s __pyx_mstate_global->__pyx_kp_s_tasks_s__cond_s
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw
#define __pyx_n_s_timeout __pyx_mstate_global->__pyx_n_s_timeout
#define __pyx_n_s_unfinished_tasks __pyx_mstate_global->__pyx_n_s_unfinished_tasks
#define __pyx_n_s_unlock __pyx_mstate_global->__pyx_n_s_unlock
#define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info
#define __pyx_n_s_wait __pyx_mstate_global->__pyx_n_s_wait
#define __pyx_n_s_waiter __pyx_mstate_global->__pyx_n_s_waiter
#define __pyx_n_s_waiter_2 __pyx_mstate_global->__pyx_n_s_waiter_2
#define __pyx_n_s_warn __pyx_mstate_global->__pyx_n_s_warn
#define __pyx_n_s_warn_depth __pyx_mstate_global->__pyx_n_s_warn_depth
#define __pyx_n_s_warnings __pyx_mstate_global->__pyx_n_s_warnings
#define __pyx_n_s_weakref __pyx_mstate_global->__pyx_n_s_weakref
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
#define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
#define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2
#define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5
#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6
#define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7
#define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
#define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
#define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
#define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
#define __pyx_tuple__13 __pyx_mstate_global->__pyx_tuple__13
#define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
#define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
#define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18
#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
#define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
#define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
#define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
#define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
#define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
#define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
#define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40
#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
#define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44
#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48
#define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50
#define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52
#define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
#define __pyx_tuple__56 __pyx_mstate_global->__pyx_tuple__56
#define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
#define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60
#define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62
#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
#define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
#define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67
#define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69
#define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71
#define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73
#define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74
#define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76
#define __pyx_tuple__78 __pyx_mstate_global->__pyx_tuple__78
#define __pyx_tuple__80 __pyx_mstate_global->__pyx_tuple__80
#define __pyx_tuple__82 __pyx_mstate_global->__pyx_tuple__82
#define __pyx_tuple__84 __pyx_mstate_global->__pyx_tuple__84
#define __pyx_tuple__86 __pyx_mstate_global->__pyx_tuple__86
#define __pyx_tuple__88 __pyx_mstate_global->__pyx_tuple__88
#define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90
#define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12
#define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15
#define __pyx_codeobj__17 __pyx_mstate_global->__pyx_codeobj__17
#define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19
#define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21
#define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23
#define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25
#define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27
#define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
#define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
#define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
#define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
#define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
#define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
#define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41
#define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43
#define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45
#define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47
#define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49
#define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51
#define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53
#define __pyx_codeobj__55 __pyx_mstate_global->__pyx_codeobj__55
#define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57
#define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59
#define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61
#define __pyx_codeobj__64 __pyx_mstate_global->__pyx_codeobj__64
#define __pyx_codeobj__66 __pyx_mstate_global->__pyx_codeobj__66
#define __pyx_codeobj__68 __pyx_mstate_global->__pyx_codeobj__68
#define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70
#define __pyx_codeobj__72 __pyx_mstate_global->__pyx_codeobj__72
#define __pyx_codeobj__75 __pyx_mstate_global->__pyx_codeobj__75
#define __pyx_codeobj__77 __pyx_mstate_global->__pyx_codeobj__77
#define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79
#define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81
#define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83
#define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85
#define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87
#define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89
#define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91
#define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92
#endif
/* #### Code section: module_code ### */

/* "src/gevent/queue.py":77
 * locals()['Waiter'] = gevent._waiter.Waiter
 * locals()['getcurrent'] = __import__('greenlet').getcurrent
 * locals()['greenlet_init'] = lambda: None             # <<<<<<<<<<<<<<
 * 
 * class ItemWaiter(Waiter): # pylint:disable=undefined-variable
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_2lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_2lambda = {"lambda", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_2lambda, METH_NOARGS, 0};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_2lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  __pyx_r = __pyx_lambda_funcdef_6gevent_14_gevent_cqueue_lambda(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_6gevent_14_gevent_cqueue_lambda(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":66
 * # pylint:disable=assignment-from-no-return
 * 
 * def _safe_remove(deq, item):             # <<<<<<<<<<<<<<
 *     # For when the item may have been removed by
 *     # Queue._unlock
 */

static PyObject *__pyx_f_6gevent_14_gevent_cqueue__safe_remove(PyObject *__pyx_v_deq, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_safe_remove", 0);

  /* "src/gevent/queue.py":69
 *     # For when the item may have been removed by
 *     # Queue._unlock
 *     try:             # <<<<<<<<<<<<<<
 *         deq.remove(item)
 *     except ValueError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "src/gevent/queue.py":70
 *     # Queue._unlock
 *     try:
 *         deq.remove(item)             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         pass
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_deq, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 70, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_item};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "src/gevent/queue.py":69
 *     # For when the item may have been removed by
 *     # Queue._unlock
 *     try:             # <<<<<<<<<<<<<<
 *         deq.remove(item)
 *     except ValueError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "src/gevent/queue.py":71
 *     try:
 *         deq.remove(item)
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "src/gevent/queue.py":69
 *     # For when the item may have been removed by
 *     # Queue._unlock
 *     try:             # <<<<<<<<<<<<<<
 *         deq.remove(item)
 *     except ValueError:
 */
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L8_try_end:;
  }

  /* "src/gevent/queue.py":66
 * # pylint:disable=assignment-from-no-return
 * 
 * def _safe_remove(deq, item):             # <<<<<<<<<<<<<<
 *     # For when the item may have been removed by
 *     # Queue._unlock
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("gevent._gevent_cqueue._safe_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":86
 *     )
 * 
 *     def __init__(self, item, queue):             # <<<<<<<<<<<<<<
 *         Waiter.__init__(self) # pylint:disable=undefined-variable
 *         self.item = item
 */

/* Python wrapper */
static int __pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_queue = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_queue,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_queue,0};
    #endif
    PyObject* values[2] = {0,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_item)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_queue)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 86, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 86, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
      values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    }
    __pyx_v_item = values[0];
    __pyx_v_queue = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 86, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.ItemWaiter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter___init__(((struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)__pyx_v_self), __pyx_v_item, __pyx_v_queue);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_queue) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "src/gevent/queue.py":87
 * 
 *     def __init__(self, item, queue):
 *         Waiter.__init__(self) # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *         self.item = item
 *         self.queue = queue
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/gevent/queue.py":88
 *     def __init__(self, item, queue):
 *         Waiter.__init__(self) # pylint:disable=undefined-variable
 *         self.item = item             # <<<<<<<<<<<<<<
 *         self.queue = queue
 * 
 */
  __Pyx_INCREF(__pyx_v_item);
  __Pyx_GIVEREF(__pyx_v_item);
  __Pyx_GOTREF(__pyx_v_self->item);
  __Pyx_DECREF(__pyx_v_self->item);
  __pyx_v_self->item = __pyx_v_item;

  /* "src/gevent/queue.py":89
 *         Waiter.__init__(self) # pylint:disable=undefined-variable
 *         self.item = item
 *         self.queue = queue             # <<<<<<<<<<<<<<
 * 
 *     def put_and_switch(self):
 */
  if (!(likely(((__pyx_v_queue) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_queue, __pyx_ptype_6gevent_14_gevent_cqueue_Queue))))) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_t_1 = __pyx_v_queue;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->queue);
  __Pyx_DECREF((PyObject *)__pyx_v_self->queue);
  __pyx_v_self->queue = ((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":86
 *     )
 * 
 *     def __init__(self, item, queue):             # <<<<<<<<<<<<<<
 *         Waiter.__init__(self) # pylint:disable=undefined-variable
 *         self.item = item
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent._gevent_cqueue.ItemWaiter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":91
 *         self.queue = queue
 * 
 *     def put_and_switch(self):             # <<<<<<<<<<<<<<
 *         self.queue._put(self.item)
 *         self.queue = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_3put_and_switch(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_10ItemWaiter_2put_and_switch, "ItemWaiter.put_and_switch(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_10ItemWaiter_3put_and_switch = {"put_and_switch", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_3put_and_switch, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_10ItemWaiter_2put_and_switch};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_3put_and_switch(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("put_and_switch (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_2put_and_switch(((struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_2put_and_switch(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put_and_switch", 0);

  /* "src/gevent/queue.py":92
 * 
 *     def put_and_switch(self):
 *         self.queue._put(self.item)             # <<<<<<<<<<<<<<
 *         self.queue = None
 *         self.item = None
 */
  __pyx_t_1 = __pyx_v_self->item;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->queue->__pyx_vtab)->_put(__pyx_v_self->queue, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/gevent/queue.py":93
 *     def put_and_switch(self):
 *         self.queue._put(self.item)
 *         self.queue = None             # <<<<<<<<<<<<<<
 *         self.item = None
 *         return self.switch(self)
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->queue);
  __Pyx_DECREF((PyObject *)__pyx_v_self->queue);
  __pyx_v_self->queue = ((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)Py_None);

  /* "src/gevent/queue.py":94
 *         self.queue._put(self.item)
 *         self.queue = None
 *         self.item = None             # <<<<<<<<<<<<<<
 *         return self.switch(self)
 * 
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->item);
  __Pyx_DECREF(__pyx_v_self->item);
  __pyx_v_self->item = Py_None;

  /* "src/gevent/queue.py":95
 *         self.queue = None
 *         self.item = None
 *         return self.switch(self)             # <<<<<<<<<<<<<<
 * 
 * class Queue(object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_switch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":91
 *         self.queue = queue
 * 
 *     def put_and_switch(self):             # <<<<<<<<<<<<<<
 *         self.queue._put(self.item)
 *         self.queue = None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent._gevent_cqueue.ItemWaiter.put_and_switch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":74
 * @cython.internal
 * cdef class ItemWaiter(Waiter):
 *     cdef readonly item             # <<<<<<<<<<<<<<
 *     cdef readonly Queue queue
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_4item_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_4item_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_4item___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_4item___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->item);
  __pyx_r = __pyx_v_self->item;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":75
 * cdef class ItemWaiter(Waiter):
 *     cdef readonly item
 *     cdef readonly Queue queue             # <<<<<<<<<<<<<<
 * 
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_5queue_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_5queue_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_5queue___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_10ItemWaiter_5queue___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self->queue);
  __pyx_r = ((PyObject *)__pyx_v_self->queue);
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":128
 *     )
 * 
 *     def __init__(self, maxsize=None, items=(), _warn_depth=2):             # <<<<<<<<<<<<<<
 *         if maxsize is not None and maxsize <= 0:
 *             if maxsize == 0:
 */

/* Python wrapper */
static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_maxsize = 0;
  PyObject *__pyx_v_items = 0;
  PyObject *__pyx_v__warn_depth = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,&__pyx_n_s_warn_depth,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,&__pyx_n_s_warn_depth,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)__pyx_empty_tuple);
    values[2] = ((PyObject *)__pyx_int_2);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maxsize);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_warn_depth);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 128, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_maxsize = values[0];
    __pyx_v_items = values[1];
    __pyx_v__warn_depth = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 128, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue___init__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items, __pyx_v__warn_depth);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_14_gevent_cqueue_5Queue___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items, PyObject *__pyx_v__warn_depth) {
  PyObject *__pyx_v_warnings = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_maxsize);

  /* "src/gevent/queue.py":129
 * 
 *     def __init__(self, maxsize=None, items=(), _warn_depth=2):
 *         if maxsize is not None and maxsize <= 0:             # <<<<<<<<<<<<<<
 *             if maxsize == 0:
 *                 import warnings
 */
  __pyx_t_2 = (__pyx_v_maxsize != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_maxsize, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "src/gevent/queue.py":130
 *     def __init__(self, maxsize=None, items=(), _warn_depth=2):
 *         if maxsize is not None and maxsize <= 0:
 *             if maxsize == 0:             # <<<<<<<<<<<<<<
 *                 import warnings
 *                 warnings.warn(
 */
    __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_maxsize, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 130, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "src/gevent/queue.py":131
 *         if maxsize is not None and maxsize <= 0:
 *             if maxsize == 0:
 *                 import warnings             # <<<<<<<<<<<<<<
 *                 warnings.warn(
 *                     'Queue(0) now equivalent to Queue(None); if you want a channel, use Channel',
 */
      __pyx_t_4 = __Pyx_ImportDottedModule(__pyx_n_s_warnings, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_warnings = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "src/gevent/queue.py":132
 *             if maxsize == 0:
 *                 import warnings
 *                 warnings.warn(             # <<<<<<<<<<<<<<
 *                     'Queue(0) now equivalent to Queue(None); if you want a channel, use Channel',
 *                     DeprecationWarning,
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 132, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "src/gevent/queue.py":135
 *                     'Queue(0) now equivalent to Queue(None); if you want a channel, use Channel',
 *                     DeprecationWarning,
 *                     stacklevel=_warn_depth)             # <<<<<<<<<<<<<<
 *             maxsize = None
 * 
 */
      __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_stacklevel, __pyx_v__warn_depth) < 0) __PYX_ERR(0, 135, __pyx_L1_error)

      /* "src/gevent/queue.py":132
 *             if maxsize == 0:
 *                 import warnings
 *                 warnings.warn(             # <<<<<<<<<<<<<<
 *                     'Queue(0) now equivalent to Queue(None); if you want a channel, use Channel',
 *                     DeprecationWarning,
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "src/gevent/queue.py":130
 *     def __init__(self, maxsize=None, items=(), _warn_depth=2):
 *         if maxsize is not None and maxsize <= 0:
 *             if maxsize == 0:             # <<<<<<<<<<<<<<
 *                 import warnings
 *                 warnings.warn(
 */
    }

    /* "src/gevent/queue.py":136
 *                     DeprecationWarning,
 *                     stacklevel=_warn_depth)
 *             maxsize = None             # <<<<<<<<<<<<<<
 * 
 *         self._maxsize = maxsize if maxsize is not None else -1
 */
    __Pyx_INCREF(Py_None);
    __Pyx_DECREF_SET(__pyx_v_maxsize, Py_None);

    /* "src/gevent/queue.py":129
 * 
 *     def __init__(self, maxsize=None, items=(), _warn_depth=2):
 *         if maxsize is not None and maxsize <= 0:             # <<<<<<<<<<<<<<
 *             if maxsize == 0:
 *                 import warnings
 */
  }

  /* "src/gevent/queue.py":138
 *             maxsize = None
 * 
 *         self._maxsize = maxsize if maxsize is not None else -1             # <<<<<<<<<<<<<<
 *         # Explicitly maintain order for getters and putters that block
 *         # so that callers can consistently rely on getting things out
 */
  __pyx_t_1 = (__pyx_v_maxsize != Py_None);
  if ((__pyx_t_1 != 0)) {
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_maxsize); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_8;
  } else {
    __pyx_t_7 = -1L;
  }
  __pyx_v_self->_maxsize = __pyx_t_7;

  /* "src/gevent/queue.py":151
 *         # many waiters that removing an arbitrary element is a
 *         # bottleneck, though.
 *         self.getters = collections.deque()             # <<<<<<<<<<<<<<
 *         self.putters = collections.deque()
 *         self.hub = get_hub()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_collections); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_deque); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_9 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->getters);
  __Pyx_DECREF(__pyx_v_self->getters);
  __pyx_v_self->getters = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "src/gevent/queue.py":152
 *         # bottleneck, though.
 *         self.getters = collections.deque()
 *         self.putters = collections.deque()             # <<<<<<<<<<<<<<
 *         self.hub = get_hub()
 *         self._event_unlock = None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_collections); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deque); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_4, };
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->putters);
  __Pyx_DECREF(__pyx_v_self->putters);
  __pyx_v_self->putters = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "src/gevent/queue.py":153
 *         self.getters = collections.deque()
 *         self.putters = collections.deque()
 *         self.hub = get_hub()             # <<<<<<<<<<<<<<
 *         self._event_unlock = None
 *         self.queue = self._create_queue(items)
 */
  __pyx_t_6 = ((PyObject *)__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_noargs(0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->hub);
  __Pyx_DECREF(__pyx_v_self->hub);
  __pyx_v_self->hub = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "src/gevent/queue.py":154
 *         self.putters = collections.deque()
 *         self.hub = get_hub()
 *         self._event_unlock = None             # <<<<<<<<<<<<<<
 *         self.queue = self._create_queue(items)
 * 
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_event_unlock);
  __Pyx_DECREF(__pyx_v_self->_event_unlock);
  __pyx_v_self->_event_unlock = Py_None;

  /* "src/gevent/queue.py":155
 *         self.hub = get_hub()
 *         self._event_unlock = None
 *         self.queue = self._create_queue(items)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_10.__pyx_n = 1;
  __pyx_t_10.items = __pyx_v_items;
  __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_create_queue(__pyx_v_self, 0, &__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_6);
  __Pyx_GOTREF(__pyx_v_self->queue);
  __Pyx_DECREF(__pyx_v_self->queue);
  __pyx_v_self->queue = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "src/gevent/queue.py":128
 *     )
 * 
 *     def __init__(self, maxsize=None, items=(), _warn_depth=2):             # <<<<<<<<<<<<<<
 *         if maxsize is not None and maxsize <= 0:
 *             if maxsize == 0:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_warnings);
  __Pyx_XDECREF(__pyx_v_maxsize);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":157
 *         self.queue = self._create_queue(items)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def maxsize(self):
 *         return self._maxsize if self._maxsize > 0 else None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_7maxsize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_7maxsize_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_7maxsize___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_7maxsize___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/gevent/queue.py":159
 *     @property
 *     def maxsize(self):
 *         return self._maxsize if self._maxsize > 0 else None             # <<<<<<<<<<<<<<
 * 
 *     @maxsize.setter
 */
  __Pyx_XDECREF(__pyx_r);
  if (((__pyx_v_self->_maxsize > 0) != 0)) {
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->_maxsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(Py_None);
    __pyx_t_1 = Py_None;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":157
 *         self.queue = self._create_queue(items)
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def maxsize(self):
 *         return self._maxsize if self._maxsize > 0 else None
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.maxsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":161
 *         return self._maxsize if self._maxsize > 0 else None
 * 
 *     @maxsize.setter             # <<<<<<<<<<<<<<
 *     def maxsize(self, nv):
 *         # QQQ make maxsize into a property with setter that schedules unlock if necessary
 */

/* Python wrapper */
static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_7maxsize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nv); /*proto*/
static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_7maxsize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nv) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_7maxsize_2__set__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), ((PyObject *)__pyx_v_nv));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_14_gevent_cqueue_5Queue_7maxsize_2__set__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_nv) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "src/gevent/queue.py":164
 *     def maxsize(self, nv):
 *         # QQQ make maxsize into a property with setter that schedules unlock if necessary
 *         if nv is None or nv <= 0:             # <<<<<<<<<<<<<<
 *             self._maxsize = -1
 *         else:
 */
  __pyx_t_2 = (__pyx_v_nv == Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_nv, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "src/gevent/queue.py":165
 *         # QQQ make maxsize into a property with setter that schedules unlock if necessary
 *         if nv is None or nv <= 0:
 *             self._maxsize = -1             # <<<<<<<<<<<<<<
 *         else:
 *             self._maxsize = nv
 */
    __pyx_v_self->_maxsize = -1L;

    /* "src/gevent/queue.py":164
 *     def maxsize(self, nv):
 *         # QQQ make maxsize into a property with setter that schedules unlock if necessary
 *         if nv is None or nv <= 0:             # <<<<<<<<<<<<<<
 *             self._maxsize = -1
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/gevent/queue.py":167
 *             self._maxsize = -1
 *         else:
 *             self._maxsize = nv             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_nv); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
    __pyx_v_self->_maxsize = __pyx_t_5;
  }
  __pyx_L3:;

  /* "src/gevent/queue.py":161
 *         return self._maxsize if self._maxsize > 0 else None
 * 
 *     @maxsize.setter             # <<<<<<<<<<<<<<
 *     def maxsize(self, nv):
 *         # QQQ make maxsize into a property with setter that schedules unlock if necessary
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.maxsize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":169
 *             self._maxsize = nv
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return type(self)(self.maxsize, self.queue)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_2copy, "Queue.copy(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_3copy = {"copy", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_3copy, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_2copy};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_2copy(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_2copy(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "src/gevent/queue.py":170
 * 
 *     def copy(self):
 *         return type(self)(self.maxsize, self.queue)             # <<<<<<<<<<<<<<
 * 
 *     def _create_queue(self, items=()):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  __pyx_t_3 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_self->queue};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":169
 *             self._maxsize = nv
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return type(self)(self.maxsize, self.queue)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":172
 *         return type(self)(self.maxsize, self.queue)
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return collections.deque(items)
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_5_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue *__pyx_optional_args) {
  PyObject *__pyx_v_items = ((PyObject *)__pyx_empty_tuple);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_queue", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_items = __pyx_optional_args->items;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_queue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_5_create_queue)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_items};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":173
 * 
 *     def _create_queue(self, items=()):
 *         return collections.deque(items)             # <<<<<<<<<<<<<<
 * 
 *     def _get(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_collections); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deque); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_items};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":172
 *         return type(self)(self.maxsize, self.queue)
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return collections.deque(items)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_5_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_4_create_queue, "Queue._create_queue(self, items=())");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_5_create_queue = {"_create_queue", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_5_create_queue, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_4_create_queue};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_5_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_items = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_create_queue (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
    #endif
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_empty_tuple);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_create_queue") < 0)) __PYX_ERR(0, 172, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_items = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_create_queue", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 172, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_4_create_queue(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), __pyx_v_items);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_4_create_queue(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_items) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_queue", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.items = __pyx_v_items;
  __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_Queue->_create_queue(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":175
 *         return collections.deque(items)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return self.queue.popleft()
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_7_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__get(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_7_get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":176
 * 
 *     def _get(self):
 *         return self.queue.popleft()             # <<<<<<<<<<<<<<
 * 
 *     def _peek(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->queue, __pyx_n_s_popleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":175
 *         return collections.deque(items)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return self.queue.popleft()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_7_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_6_get, "Queue._get(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_7_get = {"_get", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_7_get, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_6_get};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_7_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_6_get(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_6_get(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_5Queue__get(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":178
 *         return self.queue.popleft()
 * 
 *     def _peek(self):             # <<<<<<<<<<<<<<
 *         return self.queue[0]
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_9_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_peek", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_peek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_9_peek)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":179
 * 
 *     def _peek(self):
 *         return self.queue[0]             # <<<<<<<<<<<<<<
 * 
 *     def _put(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->queue, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":178
 *         return self.queue.popleft()
 * 
 *     def _peek(self):             # <<<<<<<<<<<<<<
 *         return self.queue[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_9_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_8_peek, "Queue._peek(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_9_peek = {"_peek", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_9_peek, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_8_peek};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_9_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_peek (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_8_peek(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_8_peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_peek", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_5Queue__peek(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":181
 *         return self.queue[0]
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         self.queue.append(item)
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_11_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__put(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_put", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_11_put)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_item};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":182
 * 
 *     def _put(self, item):
 *         self.queue.append(item)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->queue, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 182, __pyx_L1_error)

  /* "src/gevent/queue.py":181
 *         return self.queue[0]
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         self.queue.append(item)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_11_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_10_put, "Queue._put(self, item)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_11_put = {"_put", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_11_put, METH_O, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_10_put};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_11_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_put (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_10_put(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_10_put(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_put", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_5Queue__put(__pyx_v_self, __pyx_v_item, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":184
 *         self.queue.append(item)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s at %s%s>' % (type(self).__name__, hex(id(self)), self._format())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_13__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_13__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_12__repr__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_12__repr__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "src/gevent/queue.py":185
 * 
 *     def __repr__(self):
 *         return '<%s at %s%s>' % (type(self).__name__, hex(id(self)), self._format())             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_at_s_s, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":184
 *         self.queue.append(item)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s at %s%s>' % (type(self).__name__, hex(id(self)), self._format())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":187
 *         return '<%s at %s%s>' % (type(self).__name__, hex(id(self)), self._format())
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return '<%s%s>' % (type(self).__name__, self._format())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_15__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_15__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_14__str__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_14__str__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "src/gevent/queue.py":188
 * 
 *     def __str__(self):
 *         return '<%s%s>' % (type(self).__name__, self._format())             # <<<<<<<<<<<<<<
 * 
 *     def _format(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_4, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":187
 *         return '<%s at %s%s>' % (type(self).__name__, hex(id(self)), self._format())
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return '<%s%s>' % (type(self).__name__, self._format())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":190
 *         return '<%s%s>' % (type(self).__name__, self._format())
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = []
 *         if self.maxsize is not None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_17_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_16_format, "Queue._format(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_17_format = {"_format", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_17_format, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_16_format};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_17_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_16_format(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_16_format(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format", 0);

  /* "src/gevent/queue.py":191
 * 
 *     def _format(self):
 *         result = []             # <<<<<<<<<<<<<<
 *         if self.maxsize is not None:
 *             result.append('maxsize=%r' % (self.maxsize, ))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":192
 *     def _format(self):
 *         result = []
 *         if self.maxsize is not None:             # <<<<<<<<<<<<<<
 *             result.append('maxsize=%r' % (self.maxsize, ))
 *         if getattr(self, 'queue', None):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "src/gevent/queue.py":193
 *         result = []
 *         if self.maxsize is not None:
 *             result.append('maxsize=%r' % (self.maxsize, ))             # <<<<<<<<<<<<<<
 *         if getattr(self, 'queue', None):
 *             result.append('queue=%r' % (self.queue, ))
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_maxsize_r, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/gevent/queue.py":192
 *     def _format(self):
 *         result = []
 *         if self.maxsize is not None:             # <<<<<<<<<<<<<<
 *             result.append('maxsize=%r' % (self.maxsize, ))
 *         if getattr(self, 'queue', None):
 */
  }

  /* "src/gevent/queue.py":194
 *         if self.maxsize is not None:
 *             result.append('maxsize=%r' % (self.maxsize, ))
 *         if getattr(self, 'queue', None):             # <<<<<<<<<<<<<<
 *             result.append('queue=%r' % (self.queue, ))
 *         if self.getters:
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_queue, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "src/gevent/queue.py":195
 *             result.append('maxsize=%r' % (self.maxsize, ))
 *         if getattr(self, 'queue', None):
 *             result.append('queue=%r' % (self.queue, ))             # <<<<<<<<<<<<<<
 *         if self.getters:
 *             result.append('getters[%s]' % len(self.getters))
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_self->queue);
    __Pyx_GIVEREF(__pyx_v_self->queue);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->queue);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_queue_r, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 195, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/gevent/queue.py":194
 *         if self.maxsize is not None:
 *             result.append('maxsize=%r' % (self.maxsize, ))
 *         if getattr(self, 'queue', None):             # <<<<<<<<<<<<<<
 *             result.append('queue=%r' % (self.queue, ))
 *         if self.getters:
 */
  }

  /* "src/gevent/queue.py":196
 *         if getattr(self, 'queue', None):
 *             result.append('queue=%r' % (self.queue, ))
 *         if self.getters:             # <<<<<<<<<<<<<<
 *             result.append('getters[%s]' % len(self.getters))
 *         if self.putters:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 196, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "src/gevent/queue.py":197
 *             result.append('queue=%r' % (self.queue, ))
 *         if self.getters:
 *             result.append('getters[%s]' % len(self.getters))             # <<<<<<<<<<<<<<
 *         if self.putters:
 *             result.append('putters[%s]' % len(self.putters))
 */
    __pyx_t_4 = __pyx_v_self->getters;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_6 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_getters_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/gevent/queue.py":196
 *         if getattr(self, 'queue', None):
 *             result.append('queue=%r' % (self.queue, ))
 *         if self.getters:             # <<<<<<<<<<<<<<
 *             result.append('getters[%s]' % len(self.getters))
 *         if self.putters:
 */
  }

  /* "src/gevent/queue.py":198
 *         if self.getters:
 *             result.append('getters[%s]' % len(self.getters))
 *         if self.putters:             # <<<<<<<<<<<<<<
 *             result.append('putters[%s]' % len(self.putters))
 *         if result:
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 198, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "src/gevent/queue.py":199
 *             result.append('getters[%s]' % len(self.getters))
 *         if self.putters:
 *             result.append('putters[%s]' % len(self.putters))             # <<<<<<<<<<<<<<
 *         if result:
 *             return ' ' + ' '.join(result)
 */
    __pyx_t_1 = __pyx_v_self->putters;
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_putters_s, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 199, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "src/gevent/queue.py":198
 *         if self.getters:
 *             result.append('getters[%s]' % len(self.getters))
 *         if self.putters:             # <<<<<<<<<<<<<<
 *             result.append('putters[%s]' % len(self.putters))
 *         if result:
 */
  }

  /* "src/gevent/queue.py":200
 *         if self.putters:
 *             result.append('putters[%s]' % len(self.putters))
 *         if result:             # <<<<<<<<<<<<<<
 *             return ' ' + ' '.join(result)
 *         return ''
 */
  __pyx_t_3 = (PyList_GET_SIZE(__pyx_v_result) != 0);
  if (__pyx_t_3) {

    /* "src/gevent/queue.py":201
 *             result.append('putters[%s]' % len(self.putters))
 *         if result:
 *             return ' ' + ' '.join(result)             # <<<<<<<<<<<<<<
 *         return ''
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyNumber_Add(__pyx_kp_s__3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "src/gevent/queue.py":200
 *         if self.putters:
 *             result.append('putters[%s]' % len(self.putters))
 *         if result:             # <<<<<<<<<<<<<<
 *             return ' ' + ' '.join(result)
 *         return ''
 */
  }

  /* "src/gevent/queue.py":202
 *         if result:
 *             return ' ' + ' '.join(result)
 *         return ''             # <<<<<<<<<<<<<<
 * 
 *     def qsize(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_s__4);
  __pyx_r = __pyx_kp_s__4;
  goto __pyx_L0;

  /* "src/gevent/queue.py":190
 *         return '<%s%s>' % (type(self).__name__, self._format())
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = []
 *         if self.maxsize is not None:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":204
 *         return ''
 * 
 *     def qsize(self):             # <<<<<<<<<<<<<<
 *         """Return the size of the queue."""
 *         return len(self.queue)
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_19qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static Py_ssize_t __pyx_f_6gevent_14_gevent_cqueue_5Queue_qsize(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("qsize", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_19qsize)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 204, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":206
 *     def qsize(self):
 *         """Return the size of the queue."""
 *         return len(self.queue)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __pyx_t_1 = __pyx_v_self->queue;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 206, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "src/gevent/queue.py":204
 *         return ''
 * 
 *     def qsize(self):             # <<<<<<<<<<<<<<
 *         """Return the size of the queue."""
 *         return len(self.queue)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("gevent._gevent_cqueue.Queue.qsize", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_19qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_18qsize, "Queue.qsize(self) -> Py_ssize_t\nReturn the size of the queue.");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_19qsize = {"qsize", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_19qsize, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_18qsize};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_19qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("qsize (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_18qsize(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_18qsize(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("qsize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_f_6gevent_14_gevent_cqueue_5Queue_qsize(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.qsize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":208
 *         return len(self.queue)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the size of the queue. This is the same as :meth:`qsize`.
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_6gevent_14_gevent_cqueue_5Queue_21__len__(PyObject *__pyx_v_self); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_20__len__, "\n        Return the size of the queue. This is the same as :meth:`qsize`.\n\n        .. versionadded: 1.1b3\n\n            Previously, getting len() of a queue would raise a TypeError.\n        ");
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_6gevent_14_gevent_cqueue_5Queue_20__len__;
#endif
static Py_ssize_t __pyx_pw_6gevent_14_gevent_cqueue_5Queue_21__len__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_20__len__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_6gevent_14_gevent_cqueue_5Queue_20__len__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "src/gevent/queue.py":217
 *         """
 * 
 *         return self.qsize()             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
 */
  __pyx_r = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0);
  goto __pyx_L0;

  /* "src/gevent/queue.py":208
 *         return len(self.queue)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the size of the queue. This is the same as :meth:`qsize`.
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":219
 *         return self.qsize()
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         """
 *         A queue object is always True.
 */

/* Python wrapper */
static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_23__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_23__bool__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_22__bool__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_14_gevent_cqueue_5Queue_22__bool__(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__", 0);

  /* "src/gevent/queue.py":228
 *            to return True for backwards compatibility.
 *         """
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def __nonzero__(self):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "src/gevent/queue.py":219
 *         return self.qsize()
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         """
 *         A queue object is always True.
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":230
 *         return True
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         # Py2.
 *         # For Cython; __bool__ becomes a special method that we can't
 */

/* Python wrapper */
static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_25__nonzero__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_25__nonzero__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_24__nonzero__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_14_gevent_cqueue_5Queue_24__nonzero__(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__nonzero__", 0);

  /* "src/gevent/queue.py":234
 *         # For Cython; __bool__ becomes a special method that we can't
 *         # get by name.
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def empty(self):
 */
  __pyx_r = 1;
  goto __pyx_L0;

  /* "src/gevent/queue.py":230
 *         return True
 * 
 *     def __nonzero__(self):             # <<<<<<<<<<<<<<
 *         # Py2.
 *         # For Cython; __bool__ becomes a special method that we can't
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":236
 *         return True
 * 
 *     def empty(self):             # <<<<<<<<<<<<<<
 *         """Return ``True`` if the queue is empty, ``False`` otherwise."""
 *         return not self.qsize()
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_27empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_6gevent_14_gevent_cqueue_5Queue_empty(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("empty", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_27empty)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 236, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":238
 *     def empty(self):
 *         """Return ``True`` if the queue is empty, ``False`` otherwise."""
 *         return not self.qsize()             # <<<<<<<<<<<<<<
 * 
 *     def full(self):
 */
  __pyx_r = (!(((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0));
  goto __pyx_L0;

  /* "src/gevent/queue.py":236
 *         return True
 * 
 *     def empty(self):             # <<<<<<<<<<<<<<
 *         """Return ``True`` if the queue is empty, ``False`` otherwise."""
 *         return not self.qsize()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("gevent._gevent_cqueue.Queue.empty", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_27empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_26empty, "Queue.empty(self) -> bool\nReturn ``True`` if the queue is empty, ``False`` otherwise.");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_27empty = {"empty", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_27empty, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_26empty};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_27empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("empty (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_26empty(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_26empty(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("empty", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6gevent_14_gevent_cqueue_5Queue_empty(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.empty", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":240
 *         return not self.qsize()
 * 
 *     def full(self):             # <<<<<<<<<<<<<<
 *         """Return ``True`` if the queue is full, ``False`` otherwise.
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_29full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_6gevent_14_gevent_cqueue_5Queue_full(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("full", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_full); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_29full)) {
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_r = __pyx_t_6;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":245
 *         ``Queue(None)`` is never full.
 *         """
 *         return self._maxsize > 0 and self.qsize() >= self._maxsize             # <<<<<<<<<<<<<<
 * 
 *     def put(self, item, block=True, timeout=None):
 */
  __pyx_t_7 = ((__pyx_v_self->_maxsize > 0) != 0);
  if (__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_7 = ((((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) >= __pyx_v_self->_maxsize) != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "src/gevent/queue.py":240
 *         return not self.qsize()
 * 
 *     def full(self):             # <<<<<<<<<<<<<<
 *         """Return ``True`` if the queue is full, ``False`` otherwise.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("gevent._gevent_cqueue.Queue.full", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_29full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_28full, "Queue.full(self) -> bool\nReturn ``True`` if the queue is full, ``False`` otherwise.\n\n        ``Queue(None)`` is never full.\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_29full = {"full", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_29full, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_28full};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_29full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("full (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_28full(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_28full(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("full", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6gevent_14_gevent_cqueue_5Queue_full(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.full", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":247
 *         return self._maxsize > 0 and self.qsize() >= self._maxsize
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Put an item into the queue.
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_31put(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_put(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put *__pyx_optional_args) {
  PyObject *__pyx_v_block = ((PyObject *)Py_True);
  PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
  PyObject *__pyx_v_getter = NULL;
  struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *__pyx_v_waiter = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_block = __pyx_optional_args->block;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_timeout = __pyx_optional_args->timeout;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_timeout);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_31put)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_item, __pyx_v_block, __pyx_v_timeout};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":258
 *         is ignored in that case).
 *         """
 *         if self._maxsize == -1 or self.qsize() < self._maxsize:             # <<<<<<<<<<<<<<
 *             # there's a free slot, put an item right away
 *             self._put(item)
 */
  __pyx_t_7 = ((__pyx_v_self->_maxsize == -1L) != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_6 = __pyx_t_7;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_7 = ((((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) < __pyx_v_self->_maxsize) != 0);
  __pyx_t_6 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_6) {

    /* "src/gevent/queue.py":260
 *         if self._maxsize == -1 or self.qsize() < self._maxsize:
 *             # there's a free slot, put an item right away
 *             self._put(item)             # <<<<<<<<<<<<<<
 *             if self.getters:
 *                 self._schedule_unlock()
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_put(__pyx_v_self, __pyx_v_item, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/gevent/queue.py":261
 *             # there's a free slot, put an item right away
 *             self._put(item)
 *             if self.getters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *         elif self.hub is getcurrent(): # pylint:disable=undefined-variable
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 261, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "src/gevent/queue.py":262
 *             self._put(item)
 *             if self.getters:
 *                 self._schedule_unlock()             # <<<<<<<<<<<<<<
 *         elif self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             # We're in the mainloop, so we cannot wait; we can switch to other greenlets though.
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/gevent/queue.py":261
 *             # there's a free slot, put an item right away
 *             self._put(item)
 *             if self.getters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *         elif self.hub is getcurrent(): # pylint:disable=undefined-variable
 */
    }

    /* "src/gevent/queue.py":258
 *         is ignored in that case).
 *         """
 *         if self._maxsize == -1 or self.qsize() < self._maxsize:             # <<<<<<<<<<<<<<
 *             # there's a free slot, put an item right away
 *             self._put(item)
 */
    goto __pyx_L3;
  }

  /* "src/gevent/queue.py":263
 *             if self.getters:
 *                 self._schedule_unlock()
 *         elif self.hub is getcurrent(): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *             # We're in the mainloop, so we cannot wait; we can switch to other greenlets though.
 *             # Check if possible to get a free slot in the queue.
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_14_gevent_cqueue_getcurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__pyx_v_self->hub == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "src/gevent/queue.py":266
 *             # We're in the mainloop, so we cannot wait; we can switch to other greenlets though.
 *             # Check if possible to get a free slot in the queue.
 *             while self.getters and self.qsize() and self.qsize() >= self._maxsize:             # <<<<<<<<<<<<<<
 *                 getter = self.getters.popleft()
 *                 getter.switch(getter)
 */
    while (1) {
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 266, __pyx_L1_error)
      if (__pyx_t_6) {
      } else {
        __pyx_t_7 = __pyx_t_6;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_6 = (((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0);
      if (__pyx_t_6) {
      } else {
        __pyx_t_7 = __pyx_t_6;
        goto __pyx_L9_bool_binop_done;
      }
      __pyx_t_6 = ((((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) >= __pyx_v_self->_maxsize) != 0);
      __pyx_t_7 = __pyx_t_6;
      __pyx_L9_bool_binop_done:;
      if (!__pyx_t_7) break;

      /* "src/gevent/queue.py":267
 *             # Check if possible to get a free slot in the queue.
 *             while self.getters and self.qsize() and self.qsize() >= self._maxsize:
 *                 getter = self.getters.popleft()             # <<<<<<<<<<<<<<
 *                 getter.switch(getter)
 *             if self.qsize() < self._maxsize:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->getters, __pyx_n_s_popleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_3, };
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_getter, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "src/gevent/queue.py":268
 *             while self.getters and self.qsize() and self.qsize() >= self._maxsize:
 *                 getter = self.getters.popleft()
 *                 getter.switch(getter)             # <<<<<<<<<<<<<<
 *             if self.qsize() < self._maxsize:
 *                 self._put(item)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_getter, __pyx_n_s_switch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_getter};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "src/gevent/queue.py":269
 *                 getter = self.getters.popleft()
 *                 getter.switch(getter)
 *             if self.qsize() < self._maxsize:             # <<<<<<<<<<<<<<
 *                 self._put(item)
 *                 return
 */
    __pyx_t_7 = ((((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) < __pyx_v_self->_maxsize) != 0);
    if (__pyx_t_7) {

      /* "src/gevent/queue.py":270
 *                 getter.switch(getter)
 *             if self.qsize() < self._maxsize:
 *                 self._put(item)             # <<<<<<<<<<<<<<
 *                 return
 *             raise Full
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_put(__pyx_v_self, __pyx_v_item, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/gevent/queue.py":271
 *             if self.qsize() < self._maxsize:
 *                 self._put(item)
 *                 return             # <<<<<<<<<<<<<<
 *             raise Full
 *         elif block:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "src/gevent/queue.py":269
 *                 getter = self.getters.popleft()
 *                 getter.switch(getter)
 *             if self.qsize() < self._maxsize:             # <<<<<<<<<<<<<<
 *                 self._put(item)
 *                 return
 */
    }

    /* "src/gevent/queue.py":272
 *                 self._put(item)
 *                 return
 *             raise Full             # <<<<<<<<<<<<<<
 *         elif block:
 *             waiter = ItemWaiter(item, self)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Full); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 272, __pyx_L1_error)

    /* "src/gevent/queue.py":263
 *             if self.getters:
 *                 self._schedule_unlock()
 *         elif self.hub is getcurrent(): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *             # We're in the mainloop, so we cannot wait; we can switch to other greenlets though.
 *             # Check if possible to get a free slot in the queue.
 */
  }

  /* "src/gevent/queue.py":273
 *                 return
 *             raise Full
 *         elif block:             # <<<<<<<<<<<<<<
 *             waiter = ItemWaiter(item, self)
 *             self.putters.append(waiter)
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 273, __pyx_L1_error)
  if (likely(__pyx_t_7)) {

    /* "src/gevent/queue.py":274
 *             raise Full
 *         elif block:
 *             waiter = ItemWaiter(item, self)             # <<<<<<<<<<<<<<
 *             self.putters.append(waiter)
 *             timeout = Timeout._start_new_or_dummy(timeout, Full)
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_item);
    __Pyx_GIVEREF(__pyx_v_item);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_item);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_waiter = ((struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/gevent/queue.py":275
 *         elif block:
 *             waiter = ItemWaiter(item, self)
 *             self.putters.append(waiter)             # <<<<<<<<<<<<<<
 *             timeout = Timeout._start_new_or_dummy(timeout, Full)
 *             try:
 */
    __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_self->putters, ((PyObject *)__pyx_v_waiter)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 275, __pyx_L1_error)

    /* "src/gevent/queue.py":276
 *             waiter = ItemWaiter(item, self)
 *             self.putters.append(waiter)
 *             timeout = Timeout._start_new_or_dummy(timeout, Full)             # <<<<<<<<<<<<<<
 *             try:
 *                 if self.getters:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_6gevent_14_gevent_cqueue_Timeout, __pyx_n_s_start_new_or_dummy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Full); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_timeout, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/gevent/queue.py":277
 *             self.putters.append(waiter)
 *             timeout = Timeout._start_new_or_dummy(timeout, Full)
 *             try:             # <<<<<<<<<<<<<<
 *                 if self.getters:
 *                     self._schedule_unlock()
 */
    /*try:*/ {

      /* "src/gevent/queue.py":278
 *             timeout = Timeout._start_new_or_dummy(timeout, Full)
 *             try:
 *                 if self.getters:             # <<<<<<<<<<<<<<
 *                     self._schedule_unlock()
 *                 result = waiter.get()
 */
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 278, __pyx_L14_error)
      if (__pyx_t_7) {

        /* "src/gevent/queue.py":279
 *             try:
 *                 if self.getters:
 *                     self._schedule_unlock()             # <<<<<<<<<<<<<<
 *                 result = waiter.get()
 *                 if result is not waiter:
 */
        __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "src/gevent/queue.py":278
 *             timeout = Timeout._start_new_or_dummy(timeout, Full)
 *             try:
 *                 if self.getters:             # <<<<<<<<<<<<<<
 *                     self._schedule_unlock()
 *                 result = waiter.get()
 */
      }

      /* "src/gevent/queue.py":280
 *                 if self.getters:
 *                     self._schedule_unlock()
 *                 result = waiter.get()             # <<<<<<<<<<<<<<
 *                 if result is not waiter:
 *                     raise InvalidSwitchError("Invalid switch into Queue.put: %r" % (result, ))
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_ItemWaiter *)__pyx_v_waiter->__pyx_base.__pyx_vtab)->__pyx_base.get(((struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *)__pyx_v_waiter), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "src/gevent/queue.py":281
 *                     self._schedule_unlock()
 *                 result = waiter.get()
 *                 if result is not waiter:             # <<<<<<<<<<<<<<
 *                     raise InvalidSwitchError("Invalid switch into Queue.put: %r" % (result, ))
 *             finally:
 */
      __pyx_t_7 = (__pyx_v_result != ((PyObject *)__pyx_v_waiter));
      __pyx_t_6 = (__pyx_t_7 != 0);
      if (unlikely(__pyx_t_6)) {

        /* "src/gevent/queue.py":282
 *                 result = waiter.get()
 *                 if result is not waiter:
 *                     raise InvalidSwitchError("Invalid switch into Queue.put: %r" % (result, ))             # <<<<<<<<<<<<<<
 *             finally:
 *                 timeout.cancel()
 */
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_result);
        __Pyx_GIVEREF(__pyx_v_result);
        PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result);
        __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_switch_into_Queue_put_r, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_INCREF(__pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError);
        __pyx_t_1 = __pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 282, __pyx_L14_error)

        /* "src/gevent/queue.py":281
 *                     self._schedule_unlock()
 *                 result = waiter.get()
 *                 if result is not waiter:             # <<<<<<<<<<<<<<
 *                     raise InvalidSwitchError("Invalid switch into Queue.put: %r" % (result, ))
 *             finally:
 */
      }
    }

    /* "src/gevent/queue.py":284
 *                     raise InvalidSwitchError("Invalid switch into Queue.put: %r" % (result, ))
 *             finally:
 *                 timeout.cancel()             # <<<<<<<<<<<<<<
 *                 _safe_remove(self.putters, waiter)
 *         else:
 */
    /*finally:*/ {
      /*normal exit:*/{
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_cancel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_3, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "src/gevent/queue.py":285
 *             finally:
 *                 timeout.cancel()
 *                 _safe_remove(self.putters, waiter)             # <<<<<<<<<<<<<<
 *         else:
 *             raise Full
 */
        __pyx_t_2 = __pyx_v_self->putters;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue__safe_remove(__pyx_t_2, ((PyObject *)__pyx_v_waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L15;
      }
      __pyx_L14_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_15);
        __Pyx_XGOTREF(__pyx_t_16);
        __pyx_t_5 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
        {

          /* "src/gevent/queue.py":284
 *                     raise InvalidSwitchError("Invalid switch into Queue.put: %r" % (result, ))
 *             finally:
 *                 timeout.cancel()             # <<<<<<<<<<<<<<
 *                 _safe_remove(self.putters, waiter)
 *         else:
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          __pyx_t_17 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_17 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[1] = {__pyx_t_3, };
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_17, 0+__pyx_t_17);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "src/gevent/queue.py":285
 *             finally:
 *                 timeout.cancel()
 *                 _safe_remove(self.putters, waiter)             # <<<<<<<<<<<<<<
 *         else:
 *             raise Full
 */
          __pyx_t_1 = __pyx_v_self->putters;
          __Pyx_INCREF(__pyx_t_1);
          __pyx_t_2 = __pyx_f_6gevent_14_gevent_cqueue__safe_remove(__pyx_t_1, ((PyObject *)__pyx_v_waiter)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
        }
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
        __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
        __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
        goto __pyx_L1_error;
        __pyx_L19_error:;
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
        }
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
        goto __pyx_L1_error;
      }
      __pyx_L15:;
    }

    /* "src/gevent/queue.py":273
 *                 return
 *             raise Full
 *         elif block:             # <<<<<<<<<<<<<<
 *             waiter = ItemWaiter(item, self)
 *             self.putters.append(waiter)
 */
    goto __pyx_L3;
  }

  /* "src/gevent/queue.py":287
 *                 _safe_remove(self.putters, waiter)
 *         else:
 *             raise Full             # <<<<<<<<<<<<<<
 * 
 *     def put_nowait(self, item):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Full); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 287, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "src/gevent/queue.py":247
 *         return self._maxsize > 0 and self.qsize() >= self._maxsize
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Put an item into the queue.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_getter);
  __Pyx_XDECREF((PyObject *)__pyx_v_waiter);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_timeout);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_31put(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_30put, "Queue.put(self, item, block=True, timeout=None)\nPut an item into the queue.\n\n        If optional arg *block* is true and *timeout* is ``None`` (the default),\n        block if necessary until a free slot is available. If *timeout* is\n        a positive number, it blocks at most *timeout* seconds and raises\n        the :class:`Full` exception if no free slot was available within that time.\n        Otherwise (*block* is false), put an item on the queue if a free slot\n        is immediately available, else raise the :class:`Full` exception (*timeout*\n        is ignored in that case).\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_31put = {"put", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_31put, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_30put};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_31put(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_block = 0;
  PyObject *__pyx_v_timeout = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("put (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_True);
    values[2] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_item)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 247, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "put") < 0)) __PYX_ERR(0, 247, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_item = values[0];
    __pyx_v_block = values[1];
    __pyx_v_timeout = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("put", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 247, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_30put(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), __pyx_v_item, __pyx_v_block, __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_30put(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.block = __pyx_v_block;
  __pyx_t_2.timeout = __pyx_v_timeout;
  __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_Queue->put(__pyx_v_self, __pyx_v_item, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":289
 *             raise Full
 * 
 *     def put_nowait(self, item):             # <<<<<<<<<<<<<<
 *         """Put an item into the queue without blocking.
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_33put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_put_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put_nowait", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put_nowait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_33put_nowait)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_item};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":295
 *         Otherwise raise the :class:`Full` exception.
 *         """
 *         self.put(item, False)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.block = Py_False;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->put(__pyx_v_self, __pyx_v_item, 0, &__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/gevent/queue.py":289
 *             raise Full
 * 
 *     def put_nowait(self, item):             # <<<<<<<<<<<<<<
 *         """Put an item into the queue without blocking.
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.put_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_33put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_32put_nowait, "Queue.put_nowait(self, item)\nPut an item into the queue without blocking.\n\n        Only enqueue the item if a free slot is immediately available.\n        Otherwise raise the :class:`Full` exception.\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_33put_nowait = {"put_nowait", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_33put_nowait, METH_O, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_32put_nowait};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_33put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("put_nowait (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_32put_nowait(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_32put_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put_nowait", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_5Queue_put_nowait(__pyx_v_self, __pyx_v_item, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.put_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":298
 * 
 * 
 *     def __get_or_peek(self, method, block, timeout):             # <<<<<<<<<<<<<<
 *         # Internal helper method. The `method` should be either
 *         # self._get when called from self.get() or self._peek when
 */

static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__Queue__get_or_peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
  struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *__pyx_v_waiter = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_Queue__get_or_peek", 0);
  __Pyx_INCREF(__pyx_v_timeout);

  /* "src/gevent/queue.py":304
 *         # to see if there are items in the queue.
 * 
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *             # special case to make get_nowait() or peek_nowait() runnable in the mainloop greenlet
 *             # there are no items in the queue; try to fix the situation by unlocking putters
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_14_gevent_cqueue_getcurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_v_self->hub == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "src/gevent/queue.py":307
 *             # special case to make get_nowait() or peek_nowait() runnable in the mainloop greenlet
 *             # there are no items in the queue; try to fix the situation by unlocking putters
 *             while self.putters:             # <<<<<<<<<<<<<<
 *                 # Note: get() used popleft(), peek used pop(); popleft
 *                 # is almost certainly correct.
 */
    while (1) {
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 307, __pyx_L1_error)
      if (!__pyx_t_3) break;

      /* "src/gevent/queue.py":310
 *                 # Note: get() used popleft(), peek used pop(); popleft
 *                 # is almost certainly correct.
 *                 self.putters.popleft().put_and_switch()             # <<<<<<<<<<<<<<
 *                 if self.qsize():
 *                     return method()
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->putters, __pyx_n_s_popleft); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_6, };
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_put_and_switch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_4, };
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/gevent/queue.py":311
 *                 # is almost certainly correct.
 *                 self.putters.popleft().put_and_switch()
 *                 if self.qsize():             # <<<<<<<<<<<<<<
 *                     return method()
 *             raise Empty
 */
      __pyx_t_3 = (((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0);
      if (__pyx_t_3) {

        /* "src/gevent/queue.py":312
 *                 self.putters.popleft().put_and_switch()
 *                 if self.qsize():
 *                     return method()             # <<<<<<<<<<<<<<
 *             raise Empty
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_method);
        __pyx_t_5 = __pyx_v_method; __pyx_t_4 = NULL;
        __pyx_t_7 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "src/gevent/queue.py":311
 *                 # is almost certainly correct.
 *                 self.putters.popleft().put_and_switch()
 *                 if self.qsize():             # <<<<<<<<<<<<<<
 *                     return method()
 *             raise Empty
 */
      }
    }

    /* "src/gevent/queue.py":313
 *                 if self.qsize():
 *                     return method()
 *             raise Empty             # <<<<<<<<<<<<<<
 * 
 *         if not block:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 313, __pyx_L1_error)

    /* "src/gevent/queue.py":304
 *         # to see if there are items in the queue.
 * 
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *             # special case to make get_nowait() or peek_nowait() runnable in the mainloop greenlet
 *             # there are no items in the queue; try to fix the situation by unlocking putters
 */
  }

  /* "src/gevent/queue.py":315
 *             raise Empty
 * 
 *         if not block:             # <<<<<<<<<<<<<<
 *             # We can't block, we're not the hub, and we have nothing
 *             # to return. No choice...
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 315, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "src/gevent/queue.py":318
 *             # We can't block, we're not the hub, and we have nothing
 *             # to return. No choice...
 *             raise Empty             # <<<<<<<<<<<<<<
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 318, __pyx_L1_error)

    /* "src/gevent/queue.py":315
 *             raise Empty
 * 
 *         if not block:             # <<<<<<<<<<<<<<
 *             # We can't block, we're not the hub, and we have nothing
 *             # to return. No choice...
 */
  }

  /* "src/gevent/queue.py":320
 *             raise Empty
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)
 *         try:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_waiter = ((struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":321
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)             # <<<<<<<<<<<<<<
 *         try:
 *             self.getters.append(waiter)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_6gevent_14_gevent_cqueue_Timeout, __pyx_n_s_start_new_or_dummy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_timeout, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":322
 *         waiter = Waiter() # pylint:disable=undefined-variable
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)
 *         try:             # <<<<<<<<<<<<<<
 *             self.getters.append(waiter)
 *             if self.putters:
 */
  /*try:*/ {

    /* "src/gevent/queue.py":323
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)
 *         try:
 *             self.getters.append(waiter)             # <<<<<<<<<<<<<<
 *             if self.putters:
 *                 self._schedule_unlock()
 */
    __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_self->getters, ((PyObject *)__pyx_v_waiter)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 323, __pyx_L9_error)

    /* "src/gevent/queue.py":324
 *         try:
 *             self.getters.append(waiter)
 *             if self.putters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *             result = waiter.get()
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 324, __pyx_L9_error)
    if (__pyx_t_2) {

      /* "src/gevent/queue.py":325
 *             self.getters.append(waiter)
 *             if self.putters:
 *                 self._schedule_unlock()             # <<<<<<<<<<<<<<
 *             result = waiter.get()
 *             if result is not waiter:
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/gevent/queue.py":324
 *         try:
 *             self.getters.append(waiter)
 *             if self.putters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *             result = waiter.get()
 */
    }

    /* "src/gevent/queue.py":326
 *             if self.putters:
 *                 self._schedule_unlock()
 *             result = waiter.get()             # <<<<<<<<<<<<<<
 *             if result is not waiter:
 *                 raise InvalidSwitchError('Invalid switch into Queue.get: %r' % (result, ))
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter *)__pyx_v_waiter->__pyx_vtab)->get(__pyx_v_waiter, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L9_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "src/gevent/queue.py":327
 *                 self._schedule_unlock()
 *             result = waiter.get()
 *             if result is not waiter:             # <<<<<<<<<<<<<<
 *                 raise InvalidSwitchError('Invalid switch into Queue.get: %r' % (result, ))
 *             return method()
 */
    __pyx_t_2 = (__pyx_v_result != ((PyObject *)__pyx_v_waiter));
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (unlikely(__pyx_t_3)) {

      /* "src/gevent/queue.py":328
 *             result = waiter.get()
 *             if result is not waiter:
 *                 raise InvalidSwitchError('Invalid switch into Queue.get: %r' % (result, ))             # <<<<<<<<<<<<<<
 *             return method()
 *         finally:
 */
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 328, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_result);
      __Pyx_GIVEREF(__pyx_v_result);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result);
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_switch_into_Queue_get_r, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 328, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_INCREF(__pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError);
      __pyx_t_5 = __pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_Raise(__pyx_t_1, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __PYX_ERR(0, 328, __pyx_L9_error)

      /* "src/gevent/queue.py":327
 *                 self._schedule_unlock()
 *             result = waiter.get()
 *             if result is not waiter:             # <<<<<<<<<<<<<<
 *                 raise InvalidSwitchError('Invalid switch into Queue.get: %r' % (result, ))
 *             return method()
 */
    }

    /* "src/gevent/queue.py":329
 *             if result is not waiter:
 *                 raise InvalidSwitchError('Invalid switch into Queue.get: %r' % (result, ))
 *             return method()             # <<<<<<<<<<<<<<
 *         finally:
 *             timeout.cancel()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_method);
    __pyx_t_5 = __pyx_v_method; __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_4, };
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L8_return;
  }

  /* "src/gevent/queue.py":331
 *             return method()
 *         finally:
 *             timeout.cancel()             # <<<<<<<<<<<<<<
 *             _safe_remove(self.getters, waiter)
 * 
 */
  /*finally:*/ {
    __pyx_L9_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __pyx_t_7 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
      {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_cancel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = NULL;
        __pyx_t_17 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_17 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_17, 0+__pyx_t_17);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "src/gevent/queue.py":332
 *         finally:
 *             timeout.cancel()
 *             _safe_remove(self.getters, waiter)             # <<<<<<<<<<<<<<
 * 
 *     def get(self, block=True, timeout=None):
 */
        __pyx_t_1 = __pyx_v_self->getters;
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_5 = __pyx_f_6gevent_14_gevent_cqueue__safe_remove(__pyx_t_1, ((PyObject *)__pyx_v_waiter)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 332, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      }
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
      goto __pyx_L1_error;
      __pyx_L14_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L8_return: {
      __pyx_t_16 = __pyx_r;
      __pyx_r = 0;

      /* "src/gevent/queue.py":331
 *             return method()
 *         finally:
 *             timeout.cancel()             # <<<<<<<<<<<<<<
 *             _safe_remove(self.getters, waiter)
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_cancel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_4, };
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 331, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/gevent/queue.py":332
 *         finally:
 *             timeout.cancel()
 *             _safe_remove(self.getters, waiter)             # <<<<<<<<<<<<<<
 * 
 *     def get(self, block=True, timeout=None):
 */
      __pyx_t_5 = __pyx_v_self->getters;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue__safe_remove(__pyx_t_5, ((PyObject *)__pyx_v_waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_16;
      __pyx_t_16 = 0;
      goto __pyx_L0;
    }
  }

  /* "src/gevent/queue.py":298
 * 
 * 
 *     def __get_or_peek(self, method, block, timeout):             # <<<<<<<<<<<<<<
 *         # Internal helper method. The `method` should be either
 *         # self._get when called from self.get() or self._peek when
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._Queue__get_or_peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_waiter);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_timeout);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":334
 *             _safe_remove(self.getters, waiter)
 * 
 *     def get(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Remove and return an item from the queue.
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_35get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_get(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_get *__pyx_optional_args) {
  PyObject *__pyx_v_block = ((PyObject *)Py_True);
  PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_block = __pyx_optional_args->block;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_timeout = __pyx_optional_args->timeout;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_35get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_block, __pyx_v_timeout};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":344
 *         (*timeout* is ignored in that case).
 *         """
 *         if self.qsize():             # <<<<<<<<<<<<<<
 *             if self.putters:
 *                 self._schedule_unlock()
 */
  __pyx_t_6 = (((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0);
  if (__pyx_t_6) {

    /* "src/gevent/queue.py":345
 *         """
 *         if self.qsize():
 *             if self.putters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *             return self._get()
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 345, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "src/gevent/queue.py":346
 *         if self.qsize():
 *             if self.putters:
 *                 self._schedule_unlock()             # <<<<<<<<<<<<<<
 *             return self._get()
 * 
 */
      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/gevent/queue.py":345
 *         """
 *         if self.qsize():
 *             if self.putters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *             return self._get()
 */
    }

    /* "src/gevent/queue.py":347
 *             if self.putters:
 *                 self._schedule_unlock()
 *             return self._get()             # <<<<<<<<<<<<<<
 * 
 *         return self.__get_or_peek(self._get, block, timeout)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "src/gevent/queue.py":344
 *         (*timeout* is ignored in that case).
 *         """
 *         if self.qsize():             # <<<<<<<<<<<<<<
 *             if self.putters:
 *                 self._schedule_unlock()
 */
  }

  /* "src/gevent/queue.py":349
 *             return self._get()
 * 
 *         return self.__get_or_peek(self._get, block, timeout)             # <<<<<<<<<<<<<<
 * 
 *     def get_nowait(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_Queue__get_or_peek(__pyx_v_self, __pyx_t_1, __pyx_v_block, __pyx_v_timeout); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":334
 *             _safe_remove(self.getters, waiter)
 * 
 *     def get(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Remove and return an item from the queue.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_35get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_34get, "Queue.get(self, block=True, timeout=None)\nRemove and return an item from the queue.\n\n        If optional args *block* is true and *timeout* is ``None`` (the default),\n        block if necessary until an item is available. If *timeout* is a positive number,\n        it blocks at most *timeout* seconds and raises the :class:`Empty` exception\n        if no item was available within that time. Otherwise (*block* is false), return\n        an item if one is immediately available, else raise the :class:`Empty` exception\n        (*timeout* is ignored in that case).\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_35get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_35get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_34get};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_35get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_block = 0;
  PyObject *__pyx_v_timeout = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #endif
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_True);
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 334, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_block = values[0];
    __pyx_v_timeout = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 334, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_34get(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), __pyx_v_block, __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_34get(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_get __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.block = __pyx_v_block;
  __pyx_t_2.timeout = __pyx_v_timeout;
  __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_Queue->get(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":351
 *         return self.__get_or_peek(self._get, block, timeout)
 * 
 *     def get_nowait(self):             # <<<<<<<<<<<<<<
 *         """Remove and return an item from the queue without blocking.
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_37get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_get_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_get __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_nowait", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nowait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_37get_nowait)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":357
 *         raise the :class:`Empty` exception.
 *         """
 *         return self.get(False)             # <<<<<<<<<<<<<<
 * 
 *     def peek(self, block=True, timeout=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.block = Py_False;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0, &__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":351
 *         return self.__get_or_peek(self._get, block, timeout)
 * 
 *     def get_nowait(self):             # <<<<<<<<<<<<<<
 *         """Remove and return an item from the queue without blocking.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.get_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_37get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_36get_nowait, "Queue.get_nowait(self)\nRemove and return an item from the queue without blocking.\n\n        Only get an item if one is immediately available. Otherwise\n        raise the :class:`Empty` exception.\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_37get_nowait = {"get_nowait", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_37get_nowait, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_36get_nowait};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_37get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_nowait (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_36get_nowait(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_36get_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_nowait", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_5Queue_get_nowait(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.get_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":359
 *         return self.get(False)
 * 
 *     def peek(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Return an item from the queue without removing it.
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_39peek(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_peek *__pyx_optional_args) {
  PyObject *__pyx_v_block = ((PyObject *)Py_True);
  PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("peek", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_block = __pyx_optional_args->block;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_timeout = __pyx_optional_args->timeout;
      }
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_peek_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_39peek)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_block, __pyx_v_timeout};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":369
 *         (*timeout* is ignored in that case).
 *         """
 *         if self.qsize():             # <<<<<<<<<<<<<<
 *             # This doesn't schedule an unlock like get() does because we're not
 *             # actually making any space.
 */
  __pyx_t_6 = (((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0);
  if (__pyx_t_6) {

    /* "src/gevent/queue.py":372
 *             # This doesn't schedule an unlock like get() does because we're not
 *             # actually making any space.
 *             return self._peek()             # <<<<<<<<<<<<<<
 * 
 *         return self.__get_or_peek(self._peek, block, timeout)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_peek(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "src/gevent/queue.py":369
 *         (*timeout* is ignored in that case).
 *         """
 *         if self.qsize():             # <<<<<<<<<<<<<<
 *             # This doesn't schedule an unlock like get() does because we're not
 *             # actually making any space.
 */
  }

  /* "src/gevent/queue.py":374
 *             return self._peek()
 * 
 *         return self.__get_or_peek(self._peek, block, timeout)             # <<<<<<<<<<<<<<
 * 
 *     def peek_nowait(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_peek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_Queue__get_or_peek(__pyx_v_self, __pyx_t_1, __pyx_v_block, __pyx_v_timeout); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":359
 *         return self.get(False)
 * 
 *     def peek(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Return an item from the queue without removing it.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_39peek(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_38peek, "Queue.peek(self, block=True, timeout=None)\nReturn an item from the queue without removing it.\n\n        If optional args *block* is true and *timeout* is ``None`` (the default),\n        block if necessary until an item is available. If *timeout* is a positive number,\n        it blocks at most *timeout* seconds and raises the :class:`Empty` exception\n        if no item was available within that time. Otherwise (*block* is false), return\n        an item if one is immediately available, else raise the :class:`Empty` exception\n        (*timeout* is ignored in that case).\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_39peek = {"peek", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_39peek, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_38peek};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_39peek(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_block = 0;
  PyObject *__pyx_v_timeout = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("peek (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #endif
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_True);
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 359, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "peek") < 0)) __PYX_ERR(0, 359, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_block = values[0];
    __pyx_v_timeout = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("peek", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 359, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_38peek(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), __pyx_v_block, __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_38peek(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_peek __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("peek", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.block = __pyx_v_block;
  __pyx_t_2.timeout = __pyx_v_timeout;
  __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_Queue->peek(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":376
 *         return self.__get_or_peek(self._peek, block, timeout)
 * 
 *     def peek_nowait(self):             # <<<<<<<<<<<<<<
 *         """Return an item from the queue without blocking.
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_41peek_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue_peek_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_peek __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("peek_nowait", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_peek_nowait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_41peek_nowait)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":382
 *         raise the :class:`Empty` exception.
 *         """
 *         return self.peek(False)             # <<<<<<<<<<<<<<
 * 
 *     def _unlock(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.block = Py_False;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->peek(__pyx_v_self, 0, &__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":376
 *         return self.__get_or_peek(self._peek, block, timeout)
 * 
 *     def peek_nowait(self):             # <<<<<<<<<<<<<<
 *         """Return an item from the queue without blocking.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.peek_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_41peek_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_40peek_nowait, "Queue.peek_nowait(self)\nReturn an item from the queue without blocking.\n\n        Only return an item if one is immediately available. Otherwise\n        raise the :class:`Empty` exception.\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_41peek_nowait = {"peek_nowait", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_41peek_nowait, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_40peek_nowait};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_41peek_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("peek_nowait (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_40peek_nowait(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_40peek_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("peek_nowait", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_5Queue_peek_nowait(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.peek_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":384
 *         return self.peek(False)
 * 
 *     def _unlock(self):             # <<<<<<<<<<<<<<
 *         while True:
 *             repeat = False
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_43_unlock(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_5Queue_42_unlock, "Queue._unlock(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_5Queue_43_unlock = {"_unlock", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_43_unlock, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_42_unlock};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_43_unlock(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_unlock (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_42_unlock(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_42_unlock(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  int __pyx_v_repeat;
  PyObject *__pyx_v_putter = NULL;
  PyObject *__pyx_v_getter = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unlock", 0);

  /* "src/gevent/queue.py":385
 * 
 *     def _unlock(self):
 *         while True:             # <<<<<<<<<<<<<<
 *             repeat = False
 *             if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):
 */
  while (1) {

    /* "src/gevent/queue.py":386
 *     def _unlock(self):
 *         while True:
 *             repeat = False             # <<<<<<<<<<<<<<
 *             if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):
 *                 repeat = True
 */
    __pyx_v_repeat = 0;

    /* "src/gevent/queue.py":387
 *         while True:
 *             repeat = False
 *             if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):             # <<<<<<<<<<<<<<
 *                 repeat = True
 *                 try:
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 387, __pyx_L1_error)
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_2 = ((__pyx_v_self->_maxsize == -1L) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_2 = ((((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) < __pyx_v_self->_maxsize) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_1) {

      /* "src/gevent/queue.py":388
 *             repeat = False
 *             if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):
 *                 repeat = True             # <<<<<<<<<<<<<<
 *                 try:
 *                     putter = self.putters.popleft()
 */
      __pyx_v_repeat = 1;

      /* "src/gevent/queue.py":389
 *             if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):
 *                 repeat = True
 *                 try:             # <<<<<<<<<<<<<<
 *                     putter = self.putters.popleft()
 *                     self._put(putter.item)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_5);
        /*try:*/ {

          /* "src/gevent/queue.py":390
 *                 repeat = True
 *                 try:
 *                     putter = self.putters.popleft()             # <<<<<<<<<<<<<<
 *                     self._put(putter.item)
 *                 except: # pylint:disable=bare-except
 */
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->putters, __pyx_n_s_popleft); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 390, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = NULL;
          __pyx_t_9 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
              __pyx_t_9 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[1] = {__pyx_t_8, };
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 390, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          }
          __Pyx_XDECREF_SET(__pyx_v_putter, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "src/gevent/queue.py":391
 *                 try:
 *                     putter = self.putters.popleft()
 *                     self._put(putter.item)             # <<<<<<<<<<<<<<
 *                 except: # pylint:disable=bare-except
 *                     putter.throw(*sys.exc_info())
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_putter, __pyx_n_s_item); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->_put(__pyx_v_self, __pyx_t_6, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 391, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "src/gevent/queue.py":389
 *             if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):
 *                 repeat = True
 *                 try:             # <<<<<<<<<<<<<<
 *                     putter = self.putters.popleft()
 *                     self._put(putter.item)
 */
        }

        /* "src/gevent/queue.py":395
 *                     putter.throw(*sys.exc_info())
 *                 else:
 *                     putter.switch(putter)             # <<<<<<<<<<<<<<
 *             if self.getters and self.qsize():
 *                 repeat = True
 */
        /*else:*/ {
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_putter, __pyx_n_s_switch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_8 = NULL;
          __pyx_t_9 = 0;
          if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_9 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_putter};
            __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 395, __pyx_L11_except_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L16_try_end;
        __pyx_L9_error:;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "src/gevent/queue.py":392
 *                     putter = self.putters.popleft()
 *                     self._put(putter.item)
 *                 except: # pylint:disable=bare-except             # <<<<<<<<<<<<<<
 *                     putter.throw(*sys.exc_info())
 *                 else:
 */
        /*except:*/ {
          __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._unlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_8) < 0) __PYX_ERR(0, 392, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_GOTREF(__pyx_t_8);

          /* "src/gevent/queue.py":393
 *                     self._put(putter.item)
 *                 except: # pylint:disable=bare-except
 *                     putter.throw(*sys.exc_info())             # <<<<<<<<<<<<<<
 *                 else:
 *                     putter.switch(putter)
 */
          if (unlikely(!__pyx_v_putter)) { __Pyx_RaiseUnboundLocalError("putter"); __PYX_ERR(0, 393, __pyx_L11_except_error) }
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_putter, __pyx_n_s_throw); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 393, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_sys); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 393, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 393, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = NULL;
          __pyx_t_9 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
            if (likely(__pyx_t_12)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_13, function);
              __pyx_t_9 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[1] = {__pyx_t_12, };
            __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 393, __pyx_L11_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
          __pyx_t_13 = __Pyx_PySequence_Tuple(__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 393, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 393, __pyx_L11_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L10_exception_handled;
        }
        __pyx_L11_except_error:;

        /* "src/gevent/queue.py":389
 *             if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):
 *                 repeat = True
 *                 try:             # <<<<<<<<<<<<<<
 *                     putter = self.putters.popleft()
 *                     self._put(putter.item)
 */
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
        goto __pyx_L1_error;
        __pyx_L10_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
        __pyx_L16_try_end:;
      }

      /* "src/gevent/queue.py":387
 *         while True:
 *             repeat = False
 *             if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):             # <<<<<<<<<<<<<<
 *                 repeat = True
 *                 try:
 */
    }

    /* "src/gevent/queue.py":396
 *                 else:
 *                     putter.switch(putter)
 *             if self.getters and self.qsize():             # <<<<<<<<<<<<<<
 *                 repeat = True
 *                 getter = self.getters.popleft()
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 396, __pyx_L1_error)
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L20_bool_binop_done;
    }
    __pyx_t_2 = (((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L20_bool_binop_done:;
    if (__pyx_t_1) {

      /* "src/gevent/queue.py":397
 *                     putter.switch(putter)
 *             if self.getters and self.qsize():
 *                 repeat = True             # <<<<<<<<<<<<<<
 *                 getter = self.getters.popleft()
 *                 getter.switch(getter)
 */
      __pyx_v_repeat = 1;

      /* "src/gevent/queue.py":398
 *             if self.getters and self.qsize():
 *                 repeat = True
 *                 getter = self.getters.popleft()             # <<<<<<<<<<<<<<
 *                 getter.switch(getter)
 *             if not repeat:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->getters, __pyx_n_s_popleft); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 398, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_7, };
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 398, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_getter, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "src/gevent/queue.py":399
 *                 repeat = True
 *                 getter = self.getters.popleft()
 *                 getter.switch(getter)             # <<<<<<<<<<<<<<
 *             if not repeat:
 *                 return
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_getter, __pyx_n_s_switch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_9 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_9 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_getter};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "src/gevent/queue.py":396
 *                 else:
 *                     putter.switch(putter)
 *             if self.getters and self.qsize():             # <<<<<<<<<<<<<<
 *                 repeat = True
 *                 getter = self.getters.popleft()
 */
    }

    /* "src/gevent/queue.py":400
 *                 getter = self.getters.popleft()
 *                 getter.switch(getter)
 *             if not repeat:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_repeat != 0)) != 0);
    if (__pyx_t_1) {

      /* "src/gevent/queue.py":401
 *                 getter.switch(getter)
 *             if not repeat:
 *                 return             # <<<<<<<<<<<<<<
 * 
 *     def _schedule_unlock(self):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "src/gevent/queue.py":400
 *                 getter = self.getters.popleft()
 *                 getter.switch(getter)
 *             if not repeat:             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
    }
  }

  /* "src/gevent/queue.py":384
 *         return self.peek(False)
 * 
 *     def _unlock(self):             # <<<<<<<<<<<<<<
 *         while True:
 *             repeat = False
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._unlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_putter);
  __Pyx_XDECREF(__pyx_v_getter);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":403
 *                 return
 * 
 *     def _schedule_unlock(self):             # <<<<<<<<<<<<<<
 *         if not self._event_unlock:
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 */

static PyObject *__pyx_f_6gevent_14_gevent_cqueue_5Queue__schedule_unlock(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_schedule_unlock", 0);

  /* "src/gevent/queue.py":404
 * 
 *     def _schedule_unlock(self):
 *         if not self._event_unlock:             # <<<<<<<<<<<<<<
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_event_unlock); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 404, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "src/gevent/queue.py":405
 *     def _schedule_unlock(self):
 *         if not self._event_unlock:
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->hub, __pyx_n_s_loop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unlock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_event_unlock);
    __Pyx_DECREF(__pyx_v_self->_event_unlock);
    __pyx_v_self->_event_unlock = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "src/gevent/queue.py":404
 * 
 *     def _schedule_unlock(self):
 *         if not self._event_unlock:             # <<<<<<<<<<<<<<
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 * 
 */
  }

  /* "src/gevent/queue.py":403
 *                 return
 * 
 *     def _schedule_unlock(self):             # <<<<<<<<<<<<<<
 *         if not self._event_unlock:
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue._schedule_unlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":407
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_45__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_45__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_44__iter__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_44__iter__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "src/gevent/queue.py":408
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "src/gevent/queue.py":407
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":410
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         result = self.get()
 *         if result is StopIteration:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_46__next__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_46__next__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "src/gevent/queue.py":411
 * 
 *     def __next__(self):
 *         result = self.get()             # <<<<<<<<<<<<<<
 *         if result is StopIteration:
 *             raise result
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":412
 *     def __next__(self):
 *         result = self.get()
 *         if result is StopIteration:             # <<<<<<<<<<<<<<
 *             raise result
 *         return result
 */
  __pyx_t_2 = (__pyx_v_result == __pyx_builtin_StopIteration);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "src/gevent/queue.py":413
 *         result = self.get()
 *         if result is StopIteration:
 *             raise result             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __Pyx_Raise(__pyx_v_result, 0, 0, 0);
    __PYX_ERR(0, 413, __pyx_L1_error)

    /* "src/gevent/queue.py":412
 *     def __next__(self):
 *         result = self.get()
 *         if result is StopIteration:             # <<<<<<<<<<<<<<
 *             raise result
 *         return result
 */
  }

  /* "src/gevent/queue.py":414
 *         if result is StopIteration:
 *             raise result
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     next = __next__ # Py2
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "src/gevent/queue.py":410
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         result = self.get()
 *         if result is StopIteration:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Queue.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":41
 * cdef class Queue:
 *     cdef __weakref__
 *     cdef readonly hub             # <<<<<<<<<<<<<<
 *     cdef readonly queue
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_3hub_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_3hub_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_3hub___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_3hub___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->hub);
  __pyx_r = __pyx_v_self->hub;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":42
 *     cdef __weakref__
 *     cdef readonly hub
 *     cdef readonly queue             # <<<<<<<<<<<<<<
 * 
 *     cdef getters
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_5queue_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_5Queue_5queue_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_5Queue_5queue___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_5Queue_5queue___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->queue);
  __pyx_r = __pyx_v_self->queue;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":425
 *     __slots__ = ()
 * 
 *     def __init__(self, maxsize=None, items=()):             # <<<<<<<<<<<<<<
 *         if maxsize is not None:
 *             raise ValueError("UnboundQueue has no maxsize")
 */

/* Python wrapper */
static int __pyx_pw_6gevent_14_gevent_cqueue_12UnboundQueue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_14_gevent_cqueue_12UnboundQueue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_maxsize = 0;
  PyObject *__pyx_v_items = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,0};
    #endif
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)__pyx_empty_tuple);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maxsize);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 425, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_maxsize = values[0];
    __pyx_v_items = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 425, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.UnboundQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_12UnboundQueue___init__(((struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_14_gevent_cqueue_12UnboundQueue___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "src/gevent/queue.py":426
 * 
 *     def __init__(self, maxsize=None, items=()):
 *         if maxsize is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError("UnboundQueue has no maxsize")
 *         Queue.__init__(self, maxsize, items)
 */
  __pyx_t_1 = (__pyx_v_maxsize != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_2)) {

    /* "src/gevent/queue.py":427
 *     def __init__(self, maxsize=None, items=()):
 *         if maxsize is not None:
 *             raise ValueError("UnboundQueue has no maxsize")             # <<<<<<<<<<<<<<
 *         Queue.__init__(self, maxsize, items)
 *         self.putters = None # Will never be used.
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 427, __pyx_L1_error)

    /* "src/gevent/queue.py":426
 * 
 *     def __init__(self, maxsize=None, items=()):
 *         if maxsize is not None:             # <<<<<<<<<<<<<<
 *             raise ValueError("UnboundQueue has no maxsize")
 *         Queue.__init__(self, maxsize, items)
 */
  }

  /* "src/gevent/queue.py":428
 *         if maxsize is not None:
 *             raise ValueError("UnboundQueue has no maxsize")
 *         Queue.__init__(self, maxsize, items)             # <<<<<<<<<<<<<<
 *         self.putters = None # Will never be used.
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue), __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/gevent/queue.py":429
 *             raise ValueError("UnboundQueue has no maxsize")
 *         Queue.__init__(self, maxsize, items)
 *         self.putters = None # Will never be used.             # <<<<<<<<<<<<<<
 * 
 *     def put(self, item, block=True, timeout=None):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.putters);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.putters);
  __pyx_v_self->__pyx_base.putters = Py_None;

  /* "src/gevent/queue.py":425
 *     __slots__ = ()
 * 
 *     def __init__(self, maxsize=None, items=()):             # <<<<<<<<<<<<<<
 *         if maxsize is not None:
 *             raise ValueError("UnboundQueue has no maxsize")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("gevent._gevent_cqueue.UnboundQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":431
 *         self.putters = None # Will never be used.
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         self._put(item)
 *         if self.getters:
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_12UnboundQueue_3put(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_12UnboundQueue_put(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_item, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_12UnboundQueue_put *__pyx_optional_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put", 0);
  if (__pyx_optional_args) {
  }

  /* "src/gevent/queue.py":432
 * 
 *     def put(self, item, block=True, timeout=None):
 *         self._put(item)             # <<<<<<<<<<<<<<
 *         if self.getters:
 *             self._schedule_unlock()
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_UnboundQueue *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._put(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), __pyx_v_item, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/gevent/queue.py":433
 *     def put(self, item, block=True, timeout=None):
 *         self._put(item)
 *         if self.getters:             # <<<<<<<<<<<<<<
 *             self._schedule_unlock()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx_base.getters); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 433, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "src/gevent/queue.py":434
 *         self._put(item)
 *         if self.getters:
 *             self._schedule_unlock()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_UnboundQueue *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._schedule_unlock(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/gevent/queue.py":433
 *     def put(self, item, block=True, timeout=None):
 *         self._put(item)
 *         if self.getters:             # <<<<<<<<<<<<<<
 *             self._schedule_unlock()
 * 
 */
  }

  /* "src/gevent/queue.py":431
 *         self.putters = None # Will never be used.
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         self._put(item)
 *         if self.getters:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.UnboundQueue.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_12UnboundQueue_3put(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_12UnboundQueue_2put, "UnboundQueue.put(self, item, block=True, timeout=None)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_12UnboundQueue_3put = {"put", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_12UnboundQueue_3put, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_12UnboundQueue_2put};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_12UnboundQueue_3put(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_block = 0;
  PyObject *__pyx_v_timeout = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("put (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_True);
    values[2] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_item)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "put") < 0)) __PYX_ERR(0, 431, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_item = values[0];
    __pyx_v_block = values[1];
    __pyx_v_timeout = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("put", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 431, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.UnboundQueue.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_12UnboundQueue_2put(((struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *)__pyx_v_self), __pyx_v_item, __pyx_v_block, __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_12UnboundQueue_2put(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.block = __pyx_v_block;
  __pyx_t_2.timeout = __pyx_v_timeout;
  __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue->__pyx_base.put(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), __pyx_v_item, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.UnboundQueue.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":450
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         q = list(items)
 *         _heapify(q)
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_1_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue *__pyx_optional_args) {
  PyObject *__pyx_v_items = ((PyObject *)__pyx_empty_tuple);
  PyObject *__pyx_v_q = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_queue", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_items = __pyx_optional_args->items;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_queue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_1_create_queue)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_items};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":451
 * 
 *     def _create_queue(self, items=()):
 *         q = list(items)             # <<<<<<<<<<<<<<
 *         _heapify(q)
 *         return q
 */
  __pyx_t_1 = PySequence_List(__pyx_v_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_q = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":452
 *     def _create_queue(self, items=()):
 *         q = list(items)
 *         _heapify(q)             # <<<<<<<<<<<<<<
 *         return q
 * 
 */
  __Pyx_INCREF(__pyx_v_6gevent_14_gevent_cqueue__heapify);
  __pyx_t_2 = __pyx_v_6gevent_14_gevent_cqueue__heapify; __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_q};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/gevent/queue.py":453
 *         q = list(items)
 *         _heapify(q)
 *         return q             # <<<<<<<<<<<<<<
 * 
 *     def _put(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_q);
  __pyx_r = __pyx_v_q;
  goto __pyx_L0;

  /* "src/gevent/queue.py":450
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         q = list(items)
 *         _heapify(q)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.PriorityQueue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_q);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_1_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue, "PriorityQueue._create_queue(self, items=())");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_13PriorityQueue_1_create_queue = {"_create_queue", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_1_create_queue, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_1_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_items = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_create_queue (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
    #endif
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_empty_tuple);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 450, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_create_queue") < 0)) __PYX_ERR(0, 450, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_items = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_create_queue", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 450, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.PriorityQueue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue(((struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *)__pyx_v_self), __pyx_v_items);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_items) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_queue", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.items = __pyx_v_items;
  __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_PriorityQueue->__pyx_base._create_queue(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.PriorityQueue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":455
 *         return q
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         _heappush(self.queue, item)
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__put(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_put", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_3_put)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_item};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":456
 * 
 *     def _put(self, item):
 *         _heappush(self.queue, item)             # <<<<<<<<<<<<<<
 * 
 *     def _get(self):
 */
  __Pyx_INCREF(__pyx_v_6gevent_14_gevent_cqueue__heappush);
  __pyx_t_2 = __pyx_v_6gevent_14_gevent_cqueue__heappush; __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_self->__pyx_base.queue, __pyx_v_item};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/gevent/queue.py":455
 *         return q
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         _heappush(self.queue, item)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.PriorityQueue._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13PriorityQueue_2_put, "PriorityQueue._put(self, item)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_13PriorityQueue_3_put = {"_put", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_3_put, METH_O, __pyx_doc_6gevent_14_gevent_cqueue_13PriorityQueue_2_put};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_put (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue_2_put(((struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue_2_put(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_put", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__put(__pyx_v_self, __pyx_v_item, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.PriorityQueue._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":458
 *         _heappush(self.queue, item)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return _heappop(self.queue)
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__get(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_5_get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":459
 * 
 *     def _get(self):
 *         return _heappop(self.queue)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_6gevent_14_gevent_cqueue__heappop);
  __pyx_t_2 = __pyx_v_6gevent_14_gevent_cqueue__heappop; __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_self->__pyx_base.queue};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":458
 *         _heappush(self.queue, item)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return _heappop(self.queue)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.PriorityQueue._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13PriorityQueue_4_get, "PriorityQueue._get(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_13PriorityQueue_5_get = {"_get", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_5_get, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_13PriorityQueue_4_get};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13PriorityQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue_4_get(((struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13PriorityQueue_4_get(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__get(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.PriorityQueue._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":467
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return list(items)
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_1_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_9LifoQueue__create_queue *__pyx_optional_args) {
  PyObject *__pyx_v_items = ((PyObject *)__pyx_empty_tuple);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_queue", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_items = __pyx_optional_args->items;
    }
  }
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_queue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_1_create_queue)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_items};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":468
 * 
 *     def _create_queue(self, items=()):
 *         return list(items)             # <<<<<<<<<<<<<<
 * 
 *     def _put(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(__pyx_v_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":467
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return list(items)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_1_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_9LifoQueue__create_queue, "LifoQueue._create_queue(self, items=())");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_9LifoQueue_1_create_queue = {"_create_queue", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_1_create_queue, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_9LifoQueue__create_queue};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_1_create_queue(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_items = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_create_queue (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
    #endif
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_empty_tuple);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_create_queue") < 0)) __PYX_ERR(0, 467, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_items = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_create_queue", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 467, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue__create_queue(((struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *)__pyx_v_self), __pyx_v_items);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue__create_queue(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_items) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_create_queue", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.items = __pyx_v_items;
  __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_LifoQueue->__pyx_base._create_queue(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":470
 *         return list(items)
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         self.queue.append(item)
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__put(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_put", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_3_put)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_item};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":471
 * 
 *     def _put(self, item):
 *         self.queue.append(item)             # <<<<<<<<<<<<<<
 * 
 *     def _get(self):
 */
  __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->__pyx_base.queue, __pyx_v_item); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 471, __pyx_L1_error)

  /* "src/gevent/queue.py":470
 *         return list(items)
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         self.queue.append(item)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_9LifoQueue_2_put, "LifoQueue._put(self, item)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_9LifoQueue_3_put = {"_put", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_3_put, METH_O, __pyx_doc_6gevent_14_gevent_cqueue_9LifoQueue_2_put};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_put (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_2_put(((struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_2_put(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_put", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__put(__pyx_v_self, __pyx_v_item, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":473
 *         self.queue.append(item)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return self.queue.pop()
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__get(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_5_get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":474
 * 
 *     def _get(self):
 *         return self.queue.pop()             # <<<<<<<<<<<<<<
 * 
 *     def _peek(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_self->__pyx_base.queue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":473
 *         self.queue.append(item)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return self.queue.pop()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_9LifoQueue_4_get, "LifoQueue._get(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_9LifoQueue_5_get = {"_get", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_5_get, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_9LifoQueue_4_get};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_get (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_4_get(((struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_4_get(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__get(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":476
 *         return self.queue.pop()
 * 
 *     def _peek(self):             # <<<<<<<<<<<<<<
 *         return self.queue[-1]
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_7_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__peek(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_peek", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_peek); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_7_peek)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":477
 * 
 *     def _peek(self):
 *         return self.queue[-1]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->__pyx_base.queue, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":476
 *         return self.queue.pop()
 * 
 *     def _peek(self):             # <<<<<<<<<<<<<<
 *         return self.queue[-1]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_7_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_9LifoQueue_6_peek, "LifoQueue._peek(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_9LifoQueue_7_peek = {"_peek", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_7_peek, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_9LifoQueue_6_peek};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_9LifoQueue_7_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_peek (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_6_peek(((struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_9LifoQueue_6_peek(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_peek", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__peek(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.LifoQueue._peek", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":491
 *     )
 * 
 *     def __init__(self, maxsize=None, items=(), unfinished_tasks=None):             # <<<<<<<<<<<<<<
 *         """
 * 
 */

/* Python wrapper */
static int __pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue___init__, "\n\n        .. versionchanged:: 1.1a1\n           If *unfinished_tasks* is not given, then all the given *items*\n           (if any) will be considered unfinished.\n\n        ");
#if CYTHON_COMPILING_IN_CPYTHON
struct wrapperbase __pyx_wrapperbase_6gevent_14_gevent_cqueue_13JoinableQueue___init__;
#endif
static int __pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_maxsize = 0;
  PyObject *__pyx_v_items = 0;
  PyObject *__pyx_v_unfinished_tasks = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,&__pyx_n_s_unfinished_tasks,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,&__pyx_n_s_unfinished_tasks,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)__pyx_empty_tuple);
    values[2] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maxsize);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_items);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unfinished_tasks);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 491, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_maxsize = values[0];
    __pyx_v_items = values[1];
    __pyx_v_unfinished_tasks = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 491, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue___init__(((struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items, __pyx_v_unfinished_tasks);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items, PyObject *__pyx_v_unfinished_tasks) {
  PyObject *__pyx_v_Event = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "src/gevent/queue.py":499
 * 
 *         """
 *         Queue.__init__(self, maxsize, items, _warn_depth=3)             # <<<<<<<<<<<<<<
 * 
 *         from gevent.event import Event
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_maxsize);
  __Pyx_GIVEREF(__pyx_v_maxsize);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_maxsize);
  __Pyx_INCREF(__pyx_v_items);
  __Pyx_GIVEREF(__pyx_v_items);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_items);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_warn_depth, __pyx_int_3) < 0) __PYX_ERR(0, 499, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/gevent/queue.py":501
 *         Queue.__init__(self, maxsize, items, _warn_depth=3)
 * 
 *         from gevent.event import Event             # <<<<<<<<<<<<<<
 *         self._cond = Event()
 *         self._cond.set()
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_Event);
  __Pyx_GIVEREF(__pyx_n_s_Event);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_Event);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_gevent_event, __pyx_t_4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Event); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_Event = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/gevent/queue.py":502
 * 
 *         from gevent.event import Event
 *         self._cond = Event()             # <<<<<<<<<<<<<<
 *         self._cond.set()
 * 
 */
  __Pyx_INCREF(__pyx_v_Event);
  __pyx_t_4 = __pyx_v_Event; __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6gevent_14_gevent_cevent_Event))))) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF((PyObject *)__pyx_v_self->_cond);
  __Pyx_DECREF((PyObject *)__pyx_v_self->_cond);
  __pyx_v_self->_cond = ((struct __pyx_obj_6gevent_14_gevent_cevent_Event *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "src/gevent/queue.py":503
 *         from gevent.event import Event
 *         self._cond = Event()
 *         self._cond.set()             # <<<<<<<<<<<<<<
 * 
 *         if unfinished_tasks:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_set); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_2, };
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/gevent/queue.py":505
 *         self._cond.set()
 * 
 *         if unfinished_tasks:             # <<<<<<<<<<<<<<
 *             self.unfinished_tasks = unfinished_tasks
 *         elif items:
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_unfinished_tasks); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 505, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "src/gevent/queue.py":506
 * 
 *         if unfinished_tasks:
 *             self.unfinished_tasks = unfinished_tasks             # <<<<<<<<<<<<<<
 *         elif items:
 *             self.unfinished_tasks = len(items)
 */
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_unfinished_tasks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error)
    __pyx_v_self->unfinished_tasks = __pyx_t_5;

    /* "src/gevent/queue.py":505
 *         self._cond.set()
 * 
 *         if unfinished_tasks:             # <<<<<<<<<<<<<<
 *             self.unfinished_tasks = unfinished_tasks
 *         elif items:
 */
    goto __pyx_L3;
  }

  /* "src/gevent/queue.py":507
 *         if unfinished_tasks:
 *             self.unfinished_tasks = unfinished_tasks
 *         elif items:             # <<<<<<<<<<<<<<
 *             self.unfinished_tasks = len(items)
 *         else:
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_items); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 507, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "src/gevent/queue.py":508
 *             self.unfinished_tasks = unfinished_tasks
 *         elif items:
 *             self.unfinished_tasks = len(items)             # <<<<<<<<<<<<<<
 *         else:
 *             self.unfinished_tasks = 0
 */
    __pyx_t_7 = PyObject_Length(__pyx_v_items); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 508, __pyx_L1_error)
    __pyx_v_self->unfinished_tasks = __pyx_t_7;

    /* "src/gevent/queue.py":507
 *         if unfinished_tasks:
 *             self.unfinished_tasks = unfinished_tasks
 *         elif items:             # <<<<<<<<<<<<<<
 *             self.unfinished_tasks = len(items)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/gevent/queue.py":510
 *             self.unfinished_tasks = len(items)
 *         else:
 *             self.unfinished_tasks = 0             # <<<<<<<<<<<<<<
 * 
 *         if self.unfinished_tasks:
 */
  /*else*/ {
    __pyx_v_self->unfinished_tasks = 0;
  }
  __pyx_L3:;

  /* "src/gevent/queue.py":512
 *             self.unfinished_tasks = 0
 * 
 *         if self.unfinished_tasks:             # <<<<<<<<<<<<<<
 *             self._cond.clear()
 * 
 */
  __pyx_t_6 = (__pyx_v_self->unfinished_tasks != 0);
  if (__pyx_t_6) {

    /* "src/gevent/queue.py":513
 * 
 *         if self.unfinished_tasks:
 *             self._cond.clear()             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_2, };
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/gevent/queue.py":512
 *             self.unfinished_tasks = 0
 * 
 *         if self.unfinished_tasks:             # <<<<<<<<<<<<<<
 *             self._cond.clear()
 * 
 */
  }

  /* "src/gevent/queue.py":491
 *     )
 * 
 *     def __init__(self, maxsize=None, items=(), unfinished_tasks=None):             # <<<<<<<<<<<<<<
 *         """
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_Event);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":515
 *             self._cond.clear()
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_2copy, "JoinableQueue.copy(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_3copy = {"copy", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_3copy, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_2copy};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_2copy(((struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_2copy(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "src/gevent/queue.py":516
 * 
 *     def copy(self):
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)             # <<<<<<<<<<<<<<
 * 
 *     def _format(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_maxsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->unfinished_tasks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  __pyx_t_4 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_t_2, __pyx_v_self->__pyx_base.queue, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":515
 *             self._cond.clear()
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":518
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = Queue._format(self)
 *         if self.unfinished_tasks:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_5_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_4_format, "JoinableQueue._format(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_5_format = {"_format", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_5_format, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_4_format};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_5_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_4_format(((struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_4_format(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format", 0);

  /* "src/gevent/queue.py":519
 * 
 *     def _format(self):
 *         result = Queue._format(self)             # <<<<<<<<<<<<<<
 *         if self.unfinished_tasks:
 *             result += ' tasks=%s _cond=%s' % (self.unfinished_tasks, self._cond)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue), __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":520
 *     def _format(self):
 *         result = Queue._format(self)
 *         if self.unfinished_tasks:             # <<<<<<<<<<<<<<
 *             result += ' tasks=%s _cond=%s' % (self.unfinished_tasks, self._cond)
 *         return result
 */
  __pyx_t_5 = (__pyx_v_self->unfinished_tasks != 0);
  if (__pyx_t_5) {

    /* "src/gevent/queue.py":521
 *         result = Queue._format(self)
 *         if self.unfinished_tasks:
 *             result += ' tasks=%s _cond=%s' % (self.unfinished_tasks, self._cond)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->unfinished_tasks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_INCREF((PyObject *)__pyx_v_self->_cond);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self->_cond);
    PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_cond));
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_tasks_s__cond_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/gevent/queue.py":520
 *     def _format(self):
 *         result = Queue._format(self)
 *         if self.unfinished_tasks:             # <<<<<<<<<<<<<<
 *             result += ' tasks=%s _cond=%s' % (self.unfinished_tasks, self._cond)
 *         return result
 */
  }

  /* "src/gevent/queue.py":522
 *         if self.unfinished_tasks:
 *             result += ' tasks=%s _cond=%s' % (self.unfinished_tasks, self._cond)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def _put(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "src/gevent/queue.py":518
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = Queue._format(self)
 *         if self.unfinished_tasks:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":524
 *         return result
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         Queue._put(self, item)
 *         self.unfinished_tasks += 1
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_7_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_13JoinableQueue__put(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_put", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_7_put)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_item};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":525
 * 
 *     def _put(self, item):
 *         Queue._put(self, item)             # <<<<<<<<<<<<<<
 *         self.unfinished_tasks += 1
 *         self._cond.clear()
 */
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_5Queue__put(((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)__pyx_v_self), __pyx_v_item, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/gevent/queue.py":526
 *     def _put(self, item):
 *         Queue._put(self, item)
 *         self.unfinished_tasks += 1             # <<<<<<<<<<<<<<
 *         self._cond.clear()
 * 
 */
  __pyx_v_self->unfinished_tasks = (__pyx_v_self->unfinished_tasks + 1);

  /* "src/gevent/queue.py":527
 *         Queue._put(self, item)
 *         self.unfinished_tasks += 1
 *         self._cond.clear()             # <<<<<<<<<<<<<<
 * 
 *     def task_done(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/gevent/queue.py":524
 *         return result
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         Queue._put(self, item)
 *         self.unfinished_tasks += 1
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_7_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_6_put, "JoinableQueue._put(self, item)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_7_put = {"_put", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_7_put, METH_O, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_6_put};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_7_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_put (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_6_put(((struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_6_put(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_put", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_13JoinableQueue__put(__pyx_v_self, __pyx_v_item, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue._put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":529
 *         self._cond.clear()
 * 
 *     def task_done(self):             # <<<<<<<<<<<<<<
 *         '''Indicate that a formerly enqueued task is complete. Used by queue consumer threads.
 *         For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_9task_done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_8task_done, "JoinableQueue.task_done(self)\nIndicate that a formerly enqueued task is complete. Used by queue consumer threads.\n        For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue\n        that the processing on the task is complete.\n\n        If a :meth:`join` is currently blocking, it will resume when all items have been processed\n        (meaning that a :meth:`task_done` call was received for every item that had been\n        :meth:`put <Queue.put>` into the queue).\n\n        Raises a :exc:`ValueError` if called more times than there were items placed in the queue.\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_9task_done = {"task_done", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_9task_done, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_8task_done};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_9task_done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("task_done (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_8task_done(((struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_8task_done(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("task_done", 0);

  /* "src/gevent/queue.py":540
 *         Raises a :exc:`ValueError` if called more times than there were items placed in the queue.
 *         '''
 *         if self.unfinished_tasks <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('task_done() called too many times')
 *         self.unfinished_tasks -= 1
 */
  __pyx_t_1 = ((__pyx_v_self->unfinished_tasks <= 0) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "src/gevent/queue.py":541
 *         '''
 *         if self.unfinished_tasks <= 0:
 *             raise ValueError('task_done() called too many times')             # <<<<<<<<<<<<<<
 *         self.unfinished_tasks -= 1
 *         if self.unfinished_tasks == 0:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 541, __pyx_L1_error)

    /* "src/gevent/queue.py":540
 *         Raises a :exc:`ValueError` if called more times than there were items placed in the queue.
 *         '''
 *         if self.unfinished_tasks <= 0:             # <<<<<<<<<<<<<<
 *             raise ValueError('task_done() called too many times')
 *         self.unfinished_tasks -= 1
 */
  }

  /* "src/gevent/queue.py":542
 *         if self.unfinished_tasks <= 0:
 *             raise ValueError('task_done() called too many times')
 *         self.unfinished_tasks -= 1             # <<<<<<<<<<<<<<
 *         if self.unfinished_tasks == 0:
 *             self._cond.set()
 */
  __pyx_v_self->unfinished_tasks = (__pyx_v_self->unfinished_tasks - 1);

  /* "src/gevent/queue.py":543
 *             raise ValueError('task_done() called too many times')
 *         self.unfinished_tasks -= 1
 *         if self.unfinished_tasks == 0:             # <<<<<<<<<<<<<<
 *             self._cond.set()
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->unfinished_tasks == 0) != 0);
  if (__pyx_t_1) {

    /* "src/gevent/queue.py":544
 *         self.unfinished_tasks -= 1
 *         if self.unfinished_tasks == 0:
 *             self._cond.set()             # <<<<<<<<<<<<<<
 * 
 *     def join(self, timeout=None):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_set); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_5 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_5 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_4, };
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":543
 *             raise ValueError('task_done() called too many times')
 *         self.unfinished_tasks -= 1
 *         if self.unfinished_tasks == 0:             # <<<<<<<<<<<<<<
 *             self._cond.set()
 * 
 */
  }

  /* "src/gevent/queue.py":529
 *         self._cond.clear()
 * 
 *     def task_done(self):             # <<<<<<<<<<<<<<
 *         '''Indicate that a formerly enqueued task is complete. Used by queue consumer threads.
 *         For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue.task_done", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":546
 *             self._cond.set()
 * 
 *     def join(self, timeout=None):             # <<<<<<<<<<<<<<
 *         '''
 *         Block until all items in the queue have been gotten and processed.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_11join(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_10join, "JoinableQueue.join(self, timeout=None)\n\n        Block until all items in the queue have been gotten and processed.\n\n        The count of unfinished tasks goes up whenever an item is added to the queue.\n        The count goes down whenever a consumer thread calls :meth:`task_done` to indicate\n        that the item was retrieved and all work on it is complete. When the count of\n        unfinished tasks drops to zero, :meth:`join` unblocks.\n\n        :param float timeout: If not ``None``, then wait no more than this time in seconds\n            for all tasks to finish.\n        :return: ``True`` if all tasks have finished; if ``timeout`` was given and expired before\n            all tasks finished, ``False``.\n\n        .. versionchanged:: 1.1a1\n           Add the *timeout* parameter.\n        ");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_11join = {"join", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_11join, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_10join};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_11join(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_timeout = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("join (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};
    #endif
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 546, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "join") < 0)) __PYX_ERR(0, 546, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_timeout = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("join", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 546, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_10join(((struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)__pyx_v_self), __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_10join(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_timeout) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("join", 0);

  /* "src/gevent/queue.py":563
 *            Add the *timeout* parameter.
 *         '''
 *         return self._cond.wait(timeout=timeout)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_wait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_timeout, __pyx_v_timeout) < 0) __PYX_ERR(0, 563, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":546
 *             self._cond.set()
 * 
 *     def join(self, timeout=None):             # <<<<<<<<<<<<<<
 *         '''
 *         Block until all items in the queue have been gotten and processed.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":90
 * cdef class JoinableQueue(Queue):
 *     cdef Event _cond
 *     cdef readonly int unfinished_tasks             # <<<<<<<<<<<<<<
 * 
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_16unfinished_tasks_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_16unfinished_tasks_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_16unfinished_tasks___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_13JoinableQueue_16unfinished_tasks___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->unfinished_tasks); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.JoinableQueue.unfinished_tasks.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":576
 *     )
 * 
 *     def __init__(self, maxsize=1):             # <<<<<<<<<<<<<<
 *         # We take maxsize to simplify certain kinds of code
 *         if maxsize != 1:
 */

/* Python wrapper */
static int __pyx_pw_6gevent_14_gevent_cqueue_7Channel_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_14_gevent_cqueue_7Channel_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_maxsize = 0;
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,0};
    #endif
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_1);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maxsize);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 576, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 576, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_maxsize = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 576, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel___init__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self), __pyx_v_maxsize);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_6gevent_14_gevent_cqueue_7Channel___init__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, PyObject *__pyx_v_maxsize) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "src/gevent/queue.py":578
 *     def __init__(self, maxsize=1):
 *         # We take maxsize to simplify certain kinds of code
 *         if maxsize != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Channels have a maxsize of 1")
 *         self.getters = collections.deque()
 */
  __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_v_maxsize, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "src/gevent/queue.py":579
 *         # We take maxsize to simplify certain kinds of code
 *         if maxsize != 1:
 *             raise ValueError("Channels have a maxsize of 1")             # <<<<<<<<<<<<<<
 *         self.getters = collections.deque()
 *         self.putters = collections.deque()
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 579, __pyx_L1_error)

    /* "src/gevent/queue.py":578
 *     def __init__(self, maxsize=1):
 *         # We take maxsize to simplify certain kinds of code
 *         if maxsize != 1:             # <<<<<<<<<<<<<<
 *             raise ValueError("Channels have a maxsize of 1")
 *         self.getters = collections.deque()
 */
  }

  /* "src/gevent/queue.py":580
 *         if maxsize != 1:
 *             raise ValueError("Channels have a maxsize of 1")
 *         self.getters = collections.deque()             # <<<<<<<<<<<<<<
 *         self.putters = collections.deque()
 *         self.hub = get_hub()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_collections); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_deque); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_3, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->getters);
  __Pyx_DECREF(__pyx_v_self->getters);
  __pyx_v_self->getters = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":581
 *             raise ValueError("Channels have a maxsize of 1")
 *         self.getters = collections.deque()
 *         self.putters = collections.deque()             # <<<<<<<<<<<<<<
 *         self.hub = get_hub()
 *         self._event_unlock = None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_collections); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deque); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_4, };
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->putters);
  __Pyx_DECREF(__pyx_v_self->putters);
  __pyx_v_self->putters = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":582
 *         self.getters = collections.deque()
 *         self.putters = collections.deque()
 *         self.hub = get_hub()             # <<<<<<<<<<<<<<
 *         self._event_unlock = None
 * 
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_noargs(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->hub);
  __Pyx_DECREF(__pyx_v_self->hub);
  __pyx_v_self->hub = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":583
 *         self.putters = collections.deque()
 *         self.hub = get_hub()
 *         self._event_unlock = None             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_event_unlock);
  __Pyx_DECREF(__pyx_v_self->_event_unlock);
  __pyx_v_self->_event_unlock = Py_None;

  /* "src/gevent/queue.py":576
 *     )
 * 
 *     def __init__(self, maxsize=1):             # <<<<<<<<<<<<<<
 *         # We take maxsize to simplify certain kinds of code
 *         if maxsize != 1:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":585
 *         self._event_unlock = None
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s at %s %s>' % (type(self).__name__, hex(id(self)), self._format())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_3__repr__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_2__repr__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_2__repr__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "src/gevent/queue.py":586
 * 
 *     def __repr__(self):
 *         return '<%s at %s %s>' % (type(self).__name__, hex(id(self)), self._format())             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_5, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_at_s_s_2, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":585
 *         self._event_unlock = None
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '<%s at %s %s>' % (type(self).__name__, hex(id(self)), self._format())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":588
 *         return '<%s at %s %s>' % (type(self).__name__, hex(id(self)), self._format())
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (type(self).__name__, self._format())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_5__str__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_4__str__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_4__str__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "src/gevent/queue.py":589
 * 
 *     def __str__(self):
 *         return '<%s %s>' % (type(self).__name__, self._format())             # <<<<<<<<<<<<<<
 * 
 *     def _format(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[1] = {__pyx_t_4, };
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":588
 *         return '<%s at %s %s>' % (type(self).__name__, hex(id(self)), self._format())
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return '<%s %s>' % (type(self).__name__, self._format())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":591
 *         return '<%s %s>' % (type(self).__name__, self._format())
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = ''
 *         if self.getters:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_6_format, "Channel._format(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_7_format = {"_format", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7_format, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_6_format};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_format (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_6_format(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_6_format(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_format", 0);

  /* "src/gevent/queue.py":592
 * 
 *     def _format(self):
 *         result = ''             # <<<<<<<<<<<<<<
 *         if self.getters:
 *             result += ' getters[%s]' % len(self.getters)
 */
  __Pyx_INCREF(__pyx_kp_s__4);
  __pyx_v_result = __pyx_kp_s__4;

  /* "src/gevent/queue.py":593
 *     def _format(self):
 *         result = ''
 *         if self.getters:             # <<<<<<<<<<<<<<
 *             result += ' getters[%s]' % len(self.getters)
 *         if self.putters:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 593, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/gevent/queue.py":594
 *         result = ''
 *         if self.getters:
 *             result += ' getters[%s]' % len(self.getters)             # <<<<<<<<<<<<<<
 *         if self.putters:
 *             result += ' putters[%s]' % len(self.putters)
 */
    __pyx_t_2 = __pyx_v_self->getters;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_getters_s_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyString_CheckExact(__pyx_t_2))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", __Pyx_PyType_Name(Py_TYPE(__pyx_t_2))), 0))) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "src/gevent/queue.py":593
 *     def _format(self):
 *         result = ''
 *         if self.getters:             # <<<<<<<<<<<<<<
 *             result += ' getters[%s]' % len(self.getters)
 *         if self.putters:
 */
  }

  /* "src/gevent/queue.py":595
 *         if self.getters:
 *             result += ' getters[%s]' % len(self.getters)
 *         if self.putters:             # <<<<<<<<<<<<<<
 *             result += ' putters[%s]' % len(self.putters)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 595, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/gevent/queue.py":596
 *             result += ' getters[%s]' % len(self.getters)
 *         if self.putters:
 *             result += ' putters[%s]' % len(self.putters)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_2 = __pyx_v_self->putters;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_putters_s_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (!(likely(PyString_CheckExact(__pyx_t_2))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", __Pyx_PyType_Name(Py_TYPE(__pyx_t_2))), 0))) __PYX_ERR(0, 596, __pyx_L1_error)
    __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "src/gevent/queue.py":595
 *         if self.getters:
 *             result += ' getters[%s]' % len(self.getters)
 *         if self.putters:             # <<<<<<<<<<<<<<
 *             result += ' putters[%s]' % len(self.putters)
 *         return result
 */
  }

  /* "src/gevent/queue.py":597
 *         if self.putters:
 *             result += ' putters[%s]' % len(self.putters)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "src/gevent/queue.py":591
 *         return '<%s %s>' % (type(self).__name__, self._format())
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = ''
 *         if self.getters:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel._format", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":599
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def balance(self):
 *         return len(self.putters) - len(self.getters)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7balance_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7balance_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_7balance___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_7balance___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "src/gevent/queue.py":601
 *     @property
 *     def balance(self):
 *         return len(self.putters) - len(self.getters)             # <<<<<<<<<<<<<<
 * 
 *     def qsize(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->putters;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_v_self->getters;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_2 - __pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":599
 *         return result
 * 
 *     @property             # <<<<<<<<<<<<<<
 *     def balance(self):
 *         return len(self.putters) - len(self.getters)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.balance.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":603
 *         return len(self.putters) - len(self.getters)
 * 
 *     def qsize(self):             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_9qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_8qsize, "Channel.qsize(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_9qsize = {"qsize", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_9qsize, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_8qsize};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_9qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("qsize (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_8qsize(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_8qsize(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("qsize", 0);

  /* "src/gevent/queue.py":604
 * 
 *     def qsize(self):
 *         return 0             # <<<<<<<<<<<<<<
 * 
 *     def empty(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_int_0);
  __pyx_r = __pyx_int_0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":603
 *         return len(self.putters) - len(self.getters)
 * 
 *     def qsize(self):             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":606
 *         return 0
 * 
 *     def empty(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_11empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_10empty, "Channel.empty(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_11empty = {"empty", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_11empty, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_10empty};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_11empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("empty (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_10empty(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_10empty(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("empty", 0);

  /* "src/gevent/queue.py":607
 * 
 *     def empty(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def full(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "src/gevent/queue.py":606
 *         return 0
 * 
 *     def empty(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":609
 *         return True
 * 
 *     def full(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_13full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_12full, "Channel.full(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_13full = {"full", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_13full, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_12full};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_13full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("full (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_12full(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_12full(CYTHON_UNUSED struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("full", 0);

  /* "src/gevent/queue.py":610
 * 
 *     def full(self):
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def put(self, item, block=True, timeout=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "src/gevent/queue.py":609
 *         return True
 * 
 *     def full(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":612
 *         return True
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.getters:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_15put(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_14put, "Channel.put(self, item, block=True, timeout=None)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_15put = {"put", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_15put, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_14put};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_15put(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_item = 0;
  PyObject *__pyx_v_block = 0;
  PyObject *__pyx_v_timeout = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("put (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #endif
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_True);
    values[2] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_item)) != 0)) kw_args--;
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[2] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "put") < 0)) __PYX_ERR(0, 612, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_item = values[0];
    __pyx_v_block = values[1];
    __pyx_v_timeout = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("put", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 612, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_14put(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self), __pyx_v_item, __pyx_v_block, __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_14put(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
  PyObject *__pyx_v_getter = NULL;
  struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *__pyx_v_waiter = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  char const *__pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put", 0);
  __Pyx_INCREF(__pyx_v_item);
  __Pyx_INCREF(__pyx_v_timeout);

  /* "src/gevent/queue.py":613
 * 
 *     def put(self, item, block=True, timeout=None):
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *             if self.getters:
 *                 getter = self.getters.popleft()
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_14_gevent_cqueue_getcurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_v_self->hub == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "src/gevent/queue.py":614
 *     def put(self, item, block=True, timeout=None):
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.getters:             # <<<<<<<<<<<<<<
 *                 getter = self.getters.popleft()
 *                 getter.switch(item)
 */
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 614, __pyx_L1_error)
    if (__pyx_t_3) {

      /* "src/gevent/queue.py":615
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.getters:
 *                 getter = self.getters.popleft()             # <<<<<<<<<<<<<<
 *                 getter.switch(item)
 *                 return
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->getters, __pyx_n_s_popleft); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_5, };
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_v_getter = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "src/gevent/queue.py":616
 *             if self.getters:
 *                 getter = self.getters.popleft()
 *                 getter.switch(item)             # <<<<<<<<<<<<<<
 *                 return
 *             raise Full
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_getter, __pyx_n_s_switch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 616, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_item};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/gevent/queue.py":617
 *                 getter = self.getters.popleft()
 *                 getter.switch(item)
 *                 return             # <<<<<<<<<<<<<<
 *             raise Full
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "src/gevent/queue.py":614
 *     def put(self, item, block=True, timeout=None):
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.getters:             # <<<<<<<<<<<<<<
 *                 getter = self.getters.popleft()
 *                 getter.switch(item)
 */
    }

    /* "src/gevent/queue.py":618
 *                 getter.switch(item)
 *                 return
 *             raise Full             # <<<<<<<<<<<<<<
 * 
 *         if not block:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Full); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 618, __pyx_L1_error)

    /* "src/gevent/queue.py":613
 * 
 *     def put(self, item, block=True, timeout=None):
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *             if self.getters:
 *                 getter = self.getters.popleft()
 */
  }

  /* "src/gevent/queue.py":620
 *             raise Full
 * 
 *         if not block:             # <<<<<<<<<<<<<<
 *             timeout = 0
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 620, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  if (__pyx_t_2) {

    /* "src/gevent/queue.py":621
 * 
 *         if not block:
 *             timeout = 0             # <<<<<<<<<<<<<<
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_int_0);

    /* "src/gevent/queue.py":620
 *             raise Full
 * 
 *         if not block:             # <<<<<<<<<<<<<<
 *             timeout = 0
 * 
 */
  }

  /* "src/gevent/queue.py":623
 *             timeout = 0
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *         item = (item, waiter)
 *         self.putters.append(item)
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_waiter = ((struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":624
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable
 *         item = (item, waiter)             # <<<<<<<<<<<<<<
 *         self.putters.append(item)
 *         timeout = Timeout._start_new_or_dummy(timeout, Full)
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_item);
  __Pyx_GIVEREF(__pyx_v_item);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_item);
  __Pyx_INCREF((PyObject *)__pyx_v_waiter);
  __Pyx_GIVEREF((PyObject *)__pyx_v_waiter);
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_waiter));
  __Pyx_DECREF_SET(__pyx_v_item, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":625
 *         waiter = Waiter() # pylint:disable=undefined-variable
 *         item = (item, waiter)
 *         self.putters.append(item)             # <<<<<<<<<<<<<<
 *         timeout = Timeout._start_new_or_dummy(timeout, Full)
 *         try:
 */
  __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_self->putters, __pyx_v_item); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 625, __pyx_L1_error)

  /* "src/gevent/queue.py":626
 *         item = (item, waiter)
 *         self.putters.append(item)
 *         timeout = Timeout._start_new_or_dummy(timeout, Full)             # <<<<<<<<<<<<<<
 *         try:
 *             if self.getters:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_6gevent_14_gevent_cqueue_Timeout, __pyx_n_s_start_new_or_dummy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Full); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_8 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_timeout, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":627
 *         self.putters.append(item)
 *         timeout = Timeout._start_new_or_dummy(timeout, Full)
 *         try:             # <<<<<<<<<<<<<<
 *             if self.getters:
 *                 self._schedule_unlock()
 */
  /*try:*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      /*try:*/ {

        /* "src/gevent/queue.py":628
 *         timeout = Timeout._start_new_or_dummy(timeout, Full)
 *         try:
 *             if self.getters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *             result = waiter.get()
 */
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 628, __pyx_L9_error)
        if (__pyx_t_2) {

          /* "src/gevent/queue.py":629
 *         try:
 *             if self.getters:
 *                 self._schedule_unlock()             # <<<<<<<<<<<<<<
 *             result = waiter.get()
 *             if result is not waiter:
 */
          __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "src/gevent/queue.py":628
 *         timeout = Timeout._start_new_or_dummy(timeout, Full)
 *         try:
 *             if self.getters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *             result = waiter.get()
 */
        }

        /* "src/gevent/queue.py":630
 *             if self.getters:
 *                 self._schedule_unlock()
 *             result = waiter.get()             # <<<<<<<<<<<<<<
 *             if result is not waiter:
 *                 raise InvalidSwitchError("Invalid switch into Channel.put: %r" % (result, ))
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter *)__pyx_v_waiter->__pyx_vtab)->get(__pyx_v_waiter, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_result = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "src/gevent/queue.py":631
 *                 self._schedule_unlock()
 *             result = waiter.get()
 *             if result is not waiter:             # <<<<<<<<<<<<<<
 *                 raise InvalidSwitchError("Invalid switch into Channel.put: %r" % (result, ))
 *         except:
 */
        __pyx_t_2 = (__pyx_v_result != ((PyObject *)__pyx_v_waiter));
        __pyx_t_3 = (__pyx_t_2 != 0);
        if (unlikely(__pyx_t_3)) {

          /* "src/gevent/queue.py":632
 *             result = waiter.get()
 *             if result is not waiter:
 *                 raise InvalidSwitchError("Invalid switch into Channel.put: %r" % (result, ))             # <<<<<<<<<<<<<<
 *         except:
 *             _safe_remove(self.putters, item)
 */
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 632, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_result);
          __Pyx_GIVEREF(__pyx_v_result);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_result);
          __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_switch_into_Channel_put, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 632, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_INCREF(__pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError);
          __pyx_t_4 = __pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError; __pyx_t_8 = NULL;
          __pyx_t_6 = 0;
          if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_8)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_6 = 1;
            }
          }
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_5};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_Raise(__pyx_t_1, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __PYX_ERR(0, 632, __pyx_L9_error)

          /* "src/gevent/queue.py":631
 *                 self._schedule_unlock()
 *             result = waiter.get()
 *             if result is not waiter:             # <<<<<<<<<<<<<<
 *                 raise InvalidSwitchError("Invalid switch into Channel.put: %r" % (result, ))
 *         except:
 */
        }

        /* "src/gevent/queue.py":627
 *         self.putters.append(item)
 *         timeout = Timeout._start_new_or_dummy(timeout, Full)
 *         try:             # <<<<<<<<<<<<<<
 *             if self.getters:
 *                 self._schedule_unlock()
 */
      }
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L14_try_end;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "src/gevent/queue.py":633
 *             if result is not waiter:
 *                 raise InvalidSwitchError("Invalid switch into Channel.put: %r" % (result, ))
 *         except:             # <<<<<<<<<<<<<<
 *             _safe_remove(self.putters, item)
 *             raise
 */
      /*except:*/ {
        __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 633, __pyx_L11_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_t_5);

        /* "src/gevent/queue.py":634
 *                 raise InvalidSwitchError("Invalid switch into Channel.put: %r" % (result, ))
 *         except:
 *             _safe_remove(self.putters, item)             # <<<<<<<<<<<<<<
 *             raise
 *         finally:
 */
        __pyx_t_8 = __pyx_v_self->putters;
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_12 = __pyx_f_6gevent_14_gevent_cqueue__safe_remove(__pyx_t_8, __pyx_v_item); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 634, __pyx_L11_except_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

        /* "src/gevent/queue.py":635
 *         except:
 *             _safe_remove(self.putters, item)
 *             raise             # <<<<<<<<<<<<<<
 *         finally:
 *             timeout.cancel()
 */
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_5);
        __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; 
        __PYX_ERR(0, 635, __pyx_L11_except_error)
      }
      __pyx_L11_except_error:;

      /* "src/gevent/queue.py":627
 *         self.putters.append(item)
 *         timeout = Timeout._start_new_or_dummy(timeout, Full)
 *         try:             # <<<<<<<<<<<<<<
 *             if self.getters:
 *                 self._schedule_unlock()
 */
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      goto __pyx_L7_error;
      __pyx_L14_try_end:;
    }
  }

  /* "src/gevent/queue.py":637
 *             raise
 *         finally:
 *             timeout.cancel()             # <<<<<<<<<<<<<<
 * 
 *     def put_nowait(self, item):
 */
  /*finally:*/ {
    /*normal exit:*/{
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_cancel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = NULL;
      __pyx_t_6 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_1, };
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 637, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L8;
    }
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __pyx_t_6 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
      {
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_cancel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_1 = NULL;
        __pyx_t_18 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_18 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_1, };
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_18, 0+__pyx_t_18);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 637, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      }
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
      goto __pyx_L1_error;
      __pyx_L20_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_XGIVEREF(__pyx_t_16);
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L8:;
  }

  /* "src/gevent/queue.py":612
 *         return True
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.getters:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.put", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_getter);
  __Pyx_XDECREF((PyObject *)__pyx_v_waiter);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_timeout);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":639
 *             timeout.cancel()
 * 
 *     def put_nowait(self, item):             # <<<<<<<<<<<<<<
 *         self.put(item, False)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_17put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_16put_nowait, "Channel.put_nowait(self, item)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_17put_nowait = {"put_nowait", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_17put_nowait, METH_O, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_16put_nowait};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_17put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("put_nowait (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_16put_nowait(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self), ((PyObject *)__pyx_v_item));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_16put_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, PyObject *__pyx_v_item) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("put_nowait", 0);

  /* "src/gevent/queue.py":640
 * 
 *     def put_nowait(self, item):
 *         self.put(item, False)             # <<<<<<<<<<<<<<
 * 
 *     def get(self, block=True, timeout=None):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_put_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_item, Py_False};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/gevent/queue.py":639
 *             timeout.cancel()
 * 
 *     def put_nowait(self, item):             # <<<<<<<<<<<<<<
 *         self.put(item, False)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.put_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":642
 *         self.put(item, False)
 * 
 *     def get(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.putters:
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_19get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_7Channel_get(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_7Channel_get *__pyx_optional_args) {
  PyObject *__pyx_v_block = ((PyObject *)Py_True);
  PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_putter = NULL;
  struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *__pyx_v_waiter = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_block = __pyx_optional_args->block;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_timeout = __pyx_optional_args->timeout;
      }
    }
  }
  __Pyx_INCREF(__pyx_v_timeout);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_19get)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_block, __pyx_v_timeout};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":643
 * 
 *     def get(self, block=True, timeout=None):
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *             if self.putters:
 *                 item, putter = self.putters.popleft()
 */
  __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_14_gevent_cqueue_getcurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__pyx_v_self->hub == __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (__pyx_t_6 != 0);
  if (__pyx_t_7) {

    /* "src/gevent/queue.py":644
 *     def get(self, block=True, timeout=None):
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.putters:             # <<<<<<<<<<<<<<
 *                 item, putter = self.putters.popleft()
 *                 self.hub.loop.run_callback(putter.switch, putter)
 */
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 644, __pyx_L1_error)
    if (__pyx_t_7) {

      /* "src/gevent/queue.py":645
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.putters:
 *                 item, putter = self.putters.popleft()             # <<<<<<<<<<<<<<
 *                 self.hub.loop.run_callback(putter.switch, putter)
 *                 return item
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->putters, __pyx_n_s_popleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_3, };
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 645, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
        index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
        __pyx_t_8 = NULL;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L6_unpacking_done;
        __pyx_L5_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_8 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 645, __pyx_L1_error)
        __pyx_L6_unpacking_done:;
      }
      __pyx_v_item = __pyx_t_2;
      __pyx_t_2 = 0;
      __pyx_v_putter = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "src/gevent/queue.py":646
 *             if self.putters:
 *                 item, putter = self.putters.popleft()
 *                 self.hub.loop.run_callback(putter.switch, putter)             # <<<<<<<<<<<<<<
 *                 return item
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->hub, __pyx_n_s_loop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_putter, __pyx_n_s_switch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_5 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_putter};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/gevent/queue.py":647
 *                 item, putter = self.putters.popleft()
 *                 self.hub.loop.run_callback(putter.switch, putter)
 *                 return item             # <<<<<<<<<<<<<<
 * 
 *         if not block:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_item);
      __pyx_r = __pyx_v_item;
      goto __pyx_L0;

      /* "src/gevent/queue.py":644
 *     def get(self, block=True, timeout=None):
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.putters:             # <<<<<<<<<<<<<<
 *                 item, putter = self.putters.popleft()
 *                 self.hub.loop.run_callback(putter.switch, putter)
 */
    }

    /* "src/gevent/queue.py":643
 * 
 *     def get(self, block=True, timeout=None):
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *             if self.putters:
 *                 item, putter = self.putters.popleft()
 */
  }

  /* "src/gevent/queue.py":649
 *                 return item
 * 
 *         if not block:             # <<<<<<<<<<<<<<
 *             timeout = 0
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 649, __pyx_L1_error)
  __pyx_t_6 = ((!__pyx_t_7) != 0);
  if (__pyx_t_6) {

    /* "src/gevent/queue.py":650
 * 
 *         if not block:
 *             timeout = 0             # <<<<<<<<<<<<<<
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable
 */
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_int_0);

    /* "src/gevent/queue.py":649
 *                 return item
 * 
 *         if not block:             # <<<<<<<<<<<<<<
 *             timeout = 0
 * 
 */
  }

  /* "src/gevent/queue.py":652
 *             timeout = 0
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)
 *         try:
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_waiter = ((struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":653
 * 
 *         waiter = Waiter() # pylint:disable=undefined-variable
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)             # <<<<<<<<<<<<<<
 *         try:
 *             self.getters.append(waiter)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_6gevent_14_gevent_cqueue_Timeout, __pyx_n_s_start_new_or_dummy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_5 = 1;
    }
  }
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_timeout, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":654
 *         waiter = Waiter() # pylint:disable=undefined-variable
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)
 *         try:             # <<<<<<<<<<<<<<
 *             self.getters.append(waiter)
 *             if self.putters:
 */
  /*try:*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      /*try:*/ {

        /* "src/gevent/queue.py":655
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)
 *         try:
 *             self.getters.append(waiter)             # <<<<<<<<<<<<<<
 *             if self.putters:
 *                 self._schedule_unlock()
 */
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_self->getters, ((PyObject *)__pyx_v_waiter)); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 655, __pyx_L11_error)

        /* "src/gevent/queue.py":656
 *         try:
 *             self.getters.append(waiter)
 *             if self.putters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *             return waiter.get()
 */
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 656, __pyx_L11_error)
        if (__pyx_t_6) {

          /* "src/gevent/queue.py":657
 *             self.getters.append(waiter)
 *             if self.putters:
 *                 self._schedule_unlock()             # <<<<<<<<<<<<<<
 *             return waiter.get()
 *         except:
 */
          __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "src/gevent/queue.py":656
 *         try:
 *             self.getters.append(waiter)
 *             if self.putters:             # <<<<<<<<<<<<<<
 *                 self._schedule_unlock()
 *             return waiter.get()
 */
        }

        /* "src/gevent/queue.py":658
 *             if self.putters:
 *                 self._schedule_unlock()
 *             return waiter.get()             # <<<<<<<<<<<<<<
 *         except:
 *             self.getters.remove(waiter)
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter *)__pyx_v_waiter->__pyx_vtab)->get(__pyx_v_waiter, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L15_try_return;

        /* "src/gevent/queue.py":654
 *         waiter = Waiter() # pylint:disable=undefined-variable
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)
 *         try:             # <<<<<<<<<<<<<<
 *             self.getters.append(waiter)
 *             if self.putters:
 */
      }
      __pyx_L11_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "src/gevent/queue.py":659
 *                 self._schedule_unlock()
 *             return waiter.get()
 *         except:             # <<<<<<<<<<<<<<
 *             self.getters.remove(waiter)
 *             raise
 */
      /*except:*/ {
        __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 659, __pyx_L13_except_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_3);

        /* "src/gevent/queue.py":660
 *             return waiter.get()
 *         except:
 *             self.getters.remove(waiter)             # <<<<<<<<<<<<<<
 *             raise
 *         finally:
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->getters, __pyx_n_s_remove); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 660, __pyx_L13_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, ((PyObject *)__pyx_v_waiter)};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L13_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/gevent/queue.py":661
 *         except:
 *             self.getters.remove(waiter)
 *             raise             # <<<<<<<<<<<<<<
 *         finally:
 *             timeout.close()
 */
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);
        __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; 
        __PYX_ERR(0, 661, __pyx_L13_except_error)
      }
      __pyx_L13_except_error:;

      /* "src/gevent/queue.py":654
 *         waiter = Waiter() # pylint:disable=undefined-variable
 *         timeout = Timeout._start_new_or_dummy(timeout, Empty)
 *         try:             # <<<<<<<<<<<<<<
 *             self.getters.append(waiter)
 *             if self.putters:
 */
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      goto __pyx_L9_error;
      __pyx_L15_try_return:;
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
      goto __pyx_L8_return;
    }
  }

  /* "src/gevent/queue.py":663
 *             raise
 *         finally:
 *             timeout.close()             # <<<<<<<<<<<<<<
 * 
 *     def get_nowait(self):
 */
  /*finally:*/ {
    __pyx_L9_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __pyx_t_5 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = NULL;
        __pyx_t_20 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_20 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_1, };
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_20, 0+__pyx_t_20);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_XGIVEREF(__pyx_t_19);
        __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      }
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_10, __pyx_t_9);
      __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
      __pyx_L21_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_XGIVEREF(__pyx_t_19);
        __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L8_return: {
      __pyx_t_19 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_timeout, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      __pyx_t_15 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_15 = 1;
        }
      }
      {
        PyObject *__pyx_callargs[1] = {__pyx_t_1, };
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_15, 0+__pyx_t_15);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_19;
      __pyx_t_19 = 0;
      goto __pyx_L0;
    }
  }

  /* "src/gevent/queue.py":642
 *         self.put(item, False)
 * 
 *     def get(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.putters:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_putter);
  __Pyx_XDECREF((PyObject *)__pyx_v_waiter);
  __Pyx_XDECREF(__pyx_v_timeout);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_19get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_18get, "Channel.get(self, block=True, timeout=None)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_19get = {"get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_19get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_18get};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_19get(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_block = 0;
  PyObject *__pyx_v_timeout = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get (wrapper)", 0);
  {
    #if CYTHON_COMPILING_IN_LIMITED_API
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #else
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0};
    #endif
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_True);
    values[1] = ((PyObject *)Py_None);
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);
          if (value) { values[0] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);
          if (value) { values[1] = value; kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 642, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_block = values[0];
    __pyx_v_timeout = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 642, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_18get(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self), __pyx_v_block, __pyx_v_timeout);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_18get(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_7Channel_get __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.block = __pyx_v_block;
  __pyx_t_2.timeout = __pyx_v_timeout;
  __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_Channel->get(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":665
 *             timeout.close()
 * 
 *     def get_nowait(self):             # <<<<<<<<<<<<<<
 *         return self.get(False)
 * 
 */

static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_21get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_6gevent_14_gevent_cqueue_7Channel_get_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  struct __pyx_opt_args_6gevent_14_gevent_cqueue_7Channel_get __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_nowait", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
    #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
    if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
      PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      #endif
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_nowait); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_21get_nowait)) {
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_t_1);
        __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
        __pyx_t_5 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        {
          PyObject *__pyx_callargs[1] = {__pyx_t_4, };
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
      __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
      __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
      if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
        __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
      }
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
    }
    #endif
  }

  /* "src/gevent/queue.py":666
 * 
 *     def get_nowait(self):
 *         return self.get(False)             # <<<<<<<<<<<<<<
 * 
 *     def _unlock(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.block = Py_False;
  __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0, &__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/gevent/queue.py":665
 *             timeout.close()
 * 
 *     def get_nowait(self):             # <<<<<<<<<<<<<<
 *         return self.get(False)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.get_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_21get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_20get_nowait, "Channel.get_nowait(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_21get_nowait = {"get_nowait", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_21get_nowait, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_20get_nowait};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_21get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_nowait (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_20get_nowait(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_20get_nowait(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_nowait", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_6gevent_14_gevent_cqueue_7Channel_get_nowait(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.get_nowait", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":668
 *         return self.get(False)
 * 
 *     def _unlock(self):             # <<<<<<<<<<<<<<
 *         while self.putters and self.getters:
 *             getter = self.getters.popleft()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_23_unlock(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue_7Channel_22_unlock, "Channel._unlock(self)");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_7Channel_23_unlock = {"_unlock", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_23_unlock, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_22_unlock};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_23_unlock(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_unlock (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_22_unlock(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_22_unlock(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_v_getter = NULL;
  PyObject *__pyx_v_item = NULL;
  PyObject *__pyx_v_putter = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unlock", 0);

  /* "src/gevent/queue.py":669
 * 
 *     def _unlock(self):
 *         while self.putters and self.getters:             # <<<<<<<<<<<<<<
 *             getter = self.getters.popleft()
 *             item, putter = self.putters.popleft()
 */
  while (1) {
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->putters); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->getters); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 669, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;
    if (!__pyx_t_1) break;

    /* "src/gevent/queue.py":670
 *     def _unlock(self):
 *         while self.putters and self.getters:
 *             getter = self.getters.popleft()             # <<<<<<<<<<<<<<
 *             item, putter = self.putters.popleft()
 *             getter.switch(item)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->getters, __pyx_n_s_popleft); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_5, };
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 670, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_getter, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/gevent/queue.py":671
 *         while self.putters and self.getters:
 *             getter = self.getters.popleft()
 *             item, putter = self.putters.popleft()             # <<<<<<<<<<<<<<
 *             getter.switch(item)
 *             putter.switch(putter)
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->putters, __pyx_n_s_popleft); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[1] = {__pyx_t_5, };
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 671, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 671, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 671, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L8_unpacking_done;
      __pyx_L7_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 671, __pyx_L1_error)
      __pyx_L8_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_putter, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "src/gevent/queue.py":672
 *             getter = self.getters.popleft()
 *             item, putter = self.putters.popleft()
 *             getter.switch(item)             # <<<<<<<<<<<<<<
 *             putter.switch(putter)
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_getter, __pyx_n_s_switch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_item};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/gevent/queue.py":673
 *             item, putter = self.putters.popleft()
 *             getter.switch(item)
 *             putter.switch(putter)             # <<<<<<<<<<<<<<
 * 
 *     def _schedule_unlock(self):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_putter, __pyx_n_s_switch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_putter};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "src/gevent/queue.py":668
 *         return self.get(False)
 * 
 *     def _unlock(self):             # <<<<<<<<<<<<<<
 *         while self.putters and self.getters:
 *             getter = self.getters.popleft()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel._unlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_getter);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_XDECREF(__pyx_v_putter);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":675
 *             putter.switch(putter)
 * 
 *     def _schedule_unlock(self):             # <<<<<<<<<<<<<<
 *         if not self._event_unlock:
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 */

static PyObject *__pyx_f_6gevent_14_gevent_cqueue_7Channel__schedule_unlock(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_schedule_unlock", 0);

  /* "src/gevent/queue.py":676
 * 
 *     def _schedule_unlock(self):
 *         if not self._event_unlock:             # <<<<<<<<<<<<<<
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_event_unlock); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 676, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "src/gevent/queue.py":677
 *     def _schedule_unlock(self):
 *         if not self._event_unlock:
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->hub, __pyx_n_s_loop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unlock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 677, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_event_unlock);
    __Pyx_DECREF(__pyx_v_self->_event_unlock);
    __pyx_v_self->_event_unlock = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "src/gevent/queue.py":676
 * 
 *     def _schedule_unlock(self):
 *         if not self._event_unlock:             # <<<<<<<<<<<<<<
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 * 
 */
  }

  /* "src/gevent/queue.py":675
 *             putter.switch(putter)
 * 
 *     def _schedule_unlock(self):             # <<<<<<<<<<<<<<
 *         if not self._event_unlock:
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel._schedule_unlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":679
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_25__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_25__iter__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_24__iter__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_24__iter__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 0);

  /* "src/gevent/queue.py":680
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "src/gevent/queue.py":679
 *             self._event_unlock = self.hub.loop.run_callback(self._unlock)
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":682
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         result = self.get()
 *         if result is StopIteration:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_27__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_27__next__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_26__next__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_26__next__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__", 0);

  /* "src/gevent/queue.py":683
 * 
 *     def __next__(self):
 *         result = self.get()             # <<<<<<<<<<<<<<
 *         if result is StopIteration:
 *             raise result
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/gevent/queue.py":684
 *     def __next__(self):
 *         result = self.get()
 *         if result is StopIteration:             # <<<<<<<<<<<<<<
 *             raise result
 *         return result
 */
  __pyx_t_2 = (__pyx_v_result == __pyx_builtin_StopIteration);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "src/gevent/queue.py":685
 *         result = self.get()
 *         if result is StopIteration:
 *             raise result             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __Pyx_Raise(__pyx_v_result, 0, 0, 0);
    __PYX_ERR(0, 685, __pyx_L1_error)

    /* "src/gevent/queue.py":684
 *     def __next__(self):
 *         result = self.get()
 *         if result is StopIteration:             # <<<<<<<<<<<<<<
 *             raise result
 *         return result
 */
  }

  /* "src/gevent/queue.py":686
 *         if result is StopIteration:
 *             raise result
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     next = __next__ # Py2
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "src/gevent/queue.py":682
 *         return self
 * 
 *     def __next__(self):             # <<<<<<<<<<<<<<
 *         result = self.get()
 *         if result is StopIteration:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.Channel.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":95
 * cdef class Channel:
 *     cdef __weakref__
 *     cdef readonly getters             # <<<<<<<<<<<<<<
 *     cdef readonly putters
 *     cdef readonly hub
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7getters_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7getters_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_7getters___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_7getters___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->getters);
  __pyx_r = __pyx_v_self->getters;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":96
 *     cdef __weakref__
 *     cdef readonly getters
 *     cdef readonly putters             # <<<<<<<<<<<<<<
 *     cdef readonly hub
 *     cdef _event_unlock
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7putters_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7putters_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_7putters___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_7putters___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->putters);
  __pyx_r = __pyx_v_self->putters;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":97
 *     cdef readonly getters
 *     cdef readonly putters
 *     cdef readonly hub             # <<<<<<<<<<<<<<
 *     cdef _event_unlock
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_3hub_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_7Channel_3hub_1__get__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue_7Channel_3hub___get__(((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue_7Channel_3hub___get__(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->hub);
  __pyx_r = __pyx_v_self->hub;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/gevent/queue.py":690
 *     next = __next__ # Py2
 * 
 * def _init():             # <<<<<<<<<<<<<<
 *     greenlet_init() # pylint:disable=undefined-variable
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_1_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6gevent_14_gevent_cqueue__init, "_init()");
static PyMethodDef __pyx_mdef_6gevent_14_gevent_cqueue_1_init = {"_init", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_1_init, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue__init};
static PyObject *__pyx_pw_6gevent_14_gevent_cqueue_1_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init (wrapper)", 0);
  __pyx_r = __pyx_pf_6gevent_14_gevent_cqueue__init(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6gevent_14_gevent_cqueue__init(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_init", 0);

  /* "src/gevent/queue.py":691
 * 
 * def _init():
 *     greenlet_init() # pylint:disable=undefined-variable             # <<<<<<<<<<<<<<
 * 
 * _init()
 */
  __pyx_f_6gevent_14_gevent_cqueue_greenlet_init();

  /* "src/gevent/queue.py":690
 *     next = __next__ # Py2
 * 
 * def _init():             # <<<<<<<<<<<<<<
 *     greenlet_init() # pylint:disable=undefined-variable
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_c_greenlet_primitives.pxd":23
 * 
 * @cython.final
 * cdef inline greenlet getcurrent():             # <<<<<<<<<<<<<<
 *     return PyGreenlet_GetCurrent()
 * 
 */

static CYTHON_INLINE PyGreenlet *__pyx_f_6gevent_29_gevent_c_greenlet_primitives_getcurrent(void) {
  PyGreenlet *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getcurrent", 0);

  /* "gevent/_gevent_c_greenlet_primitives.pxd":24
 * @cython.final
 * cdef inline greenlet getcurrent():
 *     return PyGreenlet_GetCurrent()             # <<<<<<<<<<<<<<
 * 
 * cdef bint _greenlet_imported
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyGreenlet_GetCurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyGreenlet *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "gevent/_gevent_c_greenlet_primitives.pxd":23
 * 
 * @cython.final
 * cdef inline greenlet getcurrent():             # <<<<<<<<<<<<<<
 *     return PyGreenlet_GetCurrent()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_c_greenlet_primitives.getcurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_c_greenlet_primitives.pxd":28
 * cdef bint _greenlet_imported
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

static CYTHON_INLINE void __pyx_f_6gevent_29_gevent_c_greenlet_primitives_greenlet_init(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("greenlet_init", 0);

  /* "gevent/_gevent_c_greenlet_primitives.pxd":30
 * cdef inline void greenlet_init():
 *     global _greenlet_imported
 *     if not _greenlet_imported:             # <<<<<<<<<<<<<<
 *         PyGreenlet_Import()
 *         _greenlet_imported = True
 */
  __pyx_t_1 = ((!(__pyx_v_6gevent_29_gevent_c_greenlet_primitives__greenlet_imported != 0)) != 0);
  if (__pyx_t_1) {

    /* "gevent/_gevent_c_greenlet_primitives.pxd":31
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 *         PyGreenlet_Import()             # <<<<<<<<<<<<<<
 *         _greenlet_imported = True
 * 
 */
    PyGreenlet_Import();

    /* "gevent/_gevent_c_greenlet_primitives.pxd":32
 *     if not _greenlet_imported:
 *         PyGreenlet_Import()
 *         _greenlet_imported = True             # <<<<<<<<<<<<<<
 * 
 * cdef inline object _greenlet_switch(greenlet self):
 */
    __pyx_v_6gevent_29_gevent_c_greenlet_primitives__greenlet_imported = 1;

    /* "gevent/_gevent_c_greenlet_primitives.pxd":30
 * cdef inline void greenlet_init():
 *     global _greenlet_imported
 *     if not _greenlet_imported:             # <<<<<<<<<<<<<<
 *         PyGreenlet_Import()
 *         _greenlet_imported = True
 */
  }

  /* "gevent/_gevent_c_greenlet_primitives.pxd":28
 * cdef bint _greenlet_imported
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "gevent/_gevent_c_greenlet_primitives.pxd":34
 *         _greenlet_imported = True
 * 
 * cdef inline object _greenlet_switch(greenlet self):             # <<<<<<<<<<<<<<
 *     return PyGreenlet_Switch(self, NULL, NULL)
 * 
 */

static CYTHON_INLINE PyObject *__pyx_f_6gevent_29_gevent_c_greenlet_primitives__greenlet_switch(PyGreenlet *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_greenlet_switch", 0);

  /* "gevent/_gevent_c_greenlet_primitives.pxd":35
 * 
 * cdef inline object _greenlet_switch(greenlet self):
 *     return PyGreenlet_Switch(self, NULL, NULL)             # <<<<<<<<<<<<<<
 * 
 * cdef class TrackedRawGreenlet(greenlet):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyGreenlet_Switch(__pyx_v_self, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "gevent/_gevent_c_greenlet_primitives.pxd":34
 *         _greenlet_imported = True
 * 
 * cdef inline object _greenlet_switch(greenlet self):             # <<<<<<<<<<<<<<
 *     return PyGreenlet_Switch(self, NULL, NULL)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_c_greenlet_primitives._greenlet_switch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_c_waiter.pxd":24
 *     void PyGreenlet_Import()
 * 
 * cdef inline greenlet getcurrent():             # <<<<<<<<<<<<<<
 *     return PyGreenlet_GetCurrent()
 * 
 */

static CYTHON_INLINE PyGreenlet *__pyx_f_6gevent_16_gevent_c_waiter_getcurrent(void) {
  PyGreenlet *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getcurrent", 0);

  /* "gevent/_gevent_c_waiter.pxd":25
 * 
 * cdef inline greenlet getcurrent():
 *     return PyGreenlet_GetCurrent()             # <<<<<<<<<<<<<<
 * 
 * cdef inline void greenlet_init():
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyGreenlet_GetCurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 25, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyGreenlet *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "gevent/_gevent_c_waiter.pxd":24
 *     void PyGreenlet_Import()
 * 
 * cdef inline greenlet getcurrent():             # <<<<<<<<<<<<<<
 *     return PyGreenlet_GetCurrent()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_c_waiter.getcurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_c_waiter.pxd":27
 *     return PyGreenlet_GetCurrent()
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

static CYTHON_INLINE void __pyx_f_6gevent_16_gevent_c_waiter_greenlet_init(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("greenlet_init", 0);

  /* "gevent/_gevent_c_waiter.pxd":29
 * cdef inline void greenlet_init():
 *     global _greenlet_imported
 *     if not _greenlet_imported:             # <<<<<<<<<<<<<<
 *         PyGreenlet_Import()
 *         _greenlet_imported = True
 */
  __pyx_t_1 = ((!(__pyx_v_6gevent_16_gevent_c_waiter__greenlet_imported != 0)) != 0);
  if (__pyx_t_1) {

    /* "gevent/_gevent_c_waiter.pxd":30
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 *         PyGreenlet_Import()             # <<<<<<<<<<<<<<
 *         _greenlet_imported = True
 * 
 */
    PyGreenlet_Import();

    /* "gevent/_gevent_c_waiter.pxd":31
 *     if not _greenlet_imported:
 *         PyGreenlet_Import()
 *         _greenlet_imported = True             # <<<<<<<<<<<<<<
 * 
 * cdef class Waiter:
 */
    __pyx_v_6gevent_16_gevent_c_waiter__greenlet_imported = 1;

    /* "gevent/_gevent_c_waiter.pxd":29
 * cdef inline void greenlet_init():
 *     global _greenlet_imported
 *     if not _greenlet_imported:             # <<<<<<<<<<<<<<
 *         PyGreenlet_Import()
 *         _greenlet_imported = True
 */
  }

  /* "gevent/_gevent_c_waiter.pxd":27
 *     return PyGreenlet_GetCurrent()
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "gevent/_gevent_c_abstract_linkable.pxd":22
 *     void PyGreenlet_Import()
 * 
 * cdef inline greenlet getcurrent():             # <<<<<<<<<<<<<<
 *     return PyGreenlet_GetCurrent()
 * 
 */

static CYTHON_INLINE PyGreenlet *__pyx_f_6gevent_27_gevent_c_abstract_linkable_getcurrent(void) {
  PyGreenlet *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getcurrent", 0);

  /* "gevent/_gevent_c_abstract_linkable.pxd":23
 * 
 * cdef inline greenlet getcurrent():
 *     return PyGreenlet_GetCurrent()             # <<<<<<<<<<<<<<
 * 
 * cdef inline void greenlet_init():
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyGreenlet_GetCurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyGreenlet *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "gevent/_gevent_c_abstract_linkable.pxd":22
 *     void PyGreenlet_Import()
 * 
 * cdef inline greenlet getcurrent():             # <<<<<<<<<<<<<<
 *     return PyGreenlet_GetCurrent()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_c_abstract_linkable.getcurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_c_abstract_linkable.pxd":25
 *     return PyGreenlet_GetCurrent()
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

static CYTHON_INLINE void __pyx_f_6gevent_27_gevent_c_abstract_linkable_greenlet_init(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("greenlet_init", 0);

  /* "gevent/_gevent_c_abstract_linkable.pxd":27
 * cdef inline void greenlet_init():
 *     global _greenlet_imported
 *     if not _greenlet_imported:             # <<<<<<<<<<<<<<
 *         PyGreenlet_Import()
 *         _greenlet_imported = True
 */
  __pyx_t_1 = ((!(__pyx_v_6gevent_27_gevent_c_abstract_linkable__greenlet_imported != 0)) != 0);
  if (__pyx_t_1) {

    /* "gevent/_gevent_c_abstract_linkable.pxd":28
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 *         PyGreenlet_Import()             # <<<<<<<<<<<<<<
 *         _greenlet_imported = True
 * 
 */
    PyGreenlet_Import();

    /* "gevent/_gevent_c_abstract_linkable.pxd":29
 *     if not _greenlet_imported:
 *         PyGreenlet_Import()
 *         _greenlet_imported = True             # <<<<<<<<<<<<<<
 * 
 * cdef void _init()
 */
    __pyx_v_6gevent_27_gevent_c_abstract_linkable__greenlet_imported = 1;

    /* "gevent/_gevent_c_abstract_linkable.pxd":27
 * cdef inline void greenlet_init():
 *     global _greenlet_imported
 *     if not _greenlet_imported:             # <<<<<<<<<<<<<<
 *         PyGreenlet_Import()
 *         _greenlet_imported = True
 */
  }

  /* "gevent/_gevent_c_abstract_linkable.pxd":25
 *     return PyGreenlet_GetCurrent()
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "gevent/_gevent_cqueue.pxd":26
 *     void PyGreenlet_Import()
 * 
 * cdef inline greenlet getcurrent():             # <<<<<<<<<<<<<<
 *     return PyGreenlet_GetCurrent()
 * 
 */

static CYTHON_INLINE PyGreenlet *__pyx_f_6gevent_14_gevent_cqueue_getcurrent(void) {
  PyGreenlet *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getcurrent", 0);

  /* "gevent/_gevent_cqueue.pxd":27
 * 
 * cdef inline greenlet getcurrent():
 *     return PyGreenlet_GetCurrent()             # <<<<<<<<<<<<<<
 * 
 * cdef inline void greenlet_init():
 */
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)PyGreenlet_GetCurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((PyGreenlet *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "gevent/_gevent_cqueue.pxd":26
 *     void PyGreenlet_Import()
 * 
 * cdef inline greenlet getcurrent():             # <<<<<<<<<<<<<<
 *     return PyGreenlet_GetCurrent()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("gevent._gevent_cqueue.getcurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "gevent/_gevent_cqueue.pxd":29
 *     return PyGreenlet_GetCurrent()
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

static CYTHON_INLINE void __pyx_f_6gevent_14_gevent_cqueue_greenlet_init(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("greenlet_init", 0);

  /* "gevent/_gevent_cqueue.pxd":31
 * cdef inline void greenlet_init():
 *     global _greenlet_imported
 *     if not _greenlet_imported:             # <<<<<<<<<<<<<<
 *         PyGreenlet_Import()
 *         _greenlet_imported = True
 */
  __pyx_t_1 = ((!(__pyx_v_6gevent_14_gevent_cqueue__greenlet_imported != 0)) != 0);
  if (__pyx_t_1) {

    /* "gevent/_gevent_cqueue.pxd":32
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 *         PyGreenlet_Import()             # <<<<<<<<<<<<<<
 *         _greenlet_imported = True
 * 
 */
    PyGreenlet_Import();

    /* "gevent/_gevent_cqueue.pxd":33
 *     if not _greenlet_imported:
 *         PyGreenlet_Import()
 *         _greenlet_imported = True             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_v_6gevent_14_gevent_cqueue__greenlet_imported = 1;

    /* "gevent/_gevent_cqueue.pxd":31
 * cdef inline void greenlet_init():
 *     global _greenlet_imported
 *     if not _greenlet_imported:             # <<<<<<<<<<<<<<
 *         PyGreenlet_Import()
 *         _greenlet_imported = True
 */
  }

  /* "gevent/_gevent_cqueue.pxd":29
 *     return PyGreenlet_GetCurrent()
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue __pyx_vtable_6gevent_14_gevent_cqueue_Queue;

static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_Queue(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)o);
  p->__pyx_vtab = __pyx_vtabptr_6gevent_14_gevent_cqueue_Queue;
  p->hub = Py_None; Py_INCREF(Py_None);
  p->queue = Py_None; Py_INCREF(Py_None);
  p->getters = Py_None; Py_INCREF(Py_None);
  p->putters = Py_None; Py_INCREF(Py_None);
  p->_event_unlock = Py_None; Py_INCREF(Py_None);
  return o;
}

#if !CYTHON_COMPILING_IN_LIMITED_API
static void __pyx_tp_dealloc_6gevent_14_gevent_cqueue_Queue(PyObject *o) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (p->__weakref__) PyObject_ClearWeakRefs(o);
  Py_CLEAR(p->hub);
  Py_CLEAR(p->queue);
  Py_CLEAR(p->getters);
  Py_CLEAR(p->putters);
  Py_CLEAR(p->_event_unlock);
  (*Py_TYPE(o)->tp_free)(o);
}
#endif

static int __pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)o;
  if (p->hub) {
    e = (*v)(p->hub, a); if (e) return e;
  }
  if (p->queue) {
    e = (*v)(p->queue, a); if (e) return e;
  }
  if (p->getters) {
    e = (*v)(p->getters, a); if (e) return e;
  }
  if (p->putters) {
    e = (*v)(p->putters, a); if (e) return e;
  }
  if (p->_event_unlock) {
    e = (*v)(p->_event_unlock, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6gevent_14_gevent_cqueue_Queue(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)o;
  tmp = ((PyObject*)p->hub);
  p->hub = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->queue);
  p->queue = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->getters);
  p->getters = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->putters);
  p->putters = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_event_unlock);
  p->_event_unlock = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_5Queue_maxsize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_5Queue_7maxsize_1__get__(o);
}

static int __pyx_setprop_6gevent_14_gevent_cqueue_5Queue_maxsize(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6gevent_14_gevent_cqueue_5Queue_7maxsize_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_5Queue_hub(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_5Queue_3hub_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_5Queue_queue(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_5Queue_5queue_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__(self);}

static PyMethodDef __pyx_methods_6gevent_14_gevent_cqueue_Queue[] = {
  {"copy", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_3copy, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_2copy},
  {"_format", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_17_format, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_16_format},
  {"_unlock", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_43_unlock, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_5Queue_42_unlock},
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__, METH_NOARGS|METH_COEXIST, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_14_gevent_cqueue_Queue[] = {
  {(char *)"maxsize", __pyx_getprop_6gevent_14_gevent_cqueue_5Queue_maxsize, __pyx_setprop_6gevent_14_gevent_cqueue_5Queue_maxsize, (char *)0, 0},
  {(char *)"hub", __pyx_getprop_6gevent_14_gevent_cqueue_5Queue_hub, 0, (char *)0, 0},
  {(char *)"queue", __pyx_getprop_6gevent_14_gevent_cqueue_5Queue_queue, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
static PyType_Slot __pyx_type_6gevent_14_gevent_cqueue_Queue_slots[] = {
  {Py_tp_repr, (void *)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_13__repr__},
  {Py_nb_nonzero, (void *)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_25__nonzero__},
  {Py_sq_length, (void *)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_21__len__},
  {Py_mp_length, (void *)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_21__len__},
  {Py_tp_str, (void *)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_15__str__},
  {Py_tp_getattro, (void *)PyObject_GenericGetAttr},
  {Py_tp_doc, (void *)PyDoc_STR("Queue(maxsize=None, items=(), _warn_depth=2)\n\n    Create a queue object with a given maximum size.\n\n    If *maxsize* is less than or equal to zero or ``None``, the queue\n    size is infinite.\n\n    Queues have a ``len`` equal to the number of items in them (the :meth:`qsize`),\n    but in a boolean context they are always True.\n\n    .. versionchanged:: 1.1b3\n       Queues now support :func:`len`; it behaves the same as :meth:`qsize`.\n    .. versionchanged:: 1.1b3\n       Multiple greenlets that block on a call to :meth:`put` for a full queue\n       will now be awakened to put their items into the queue in the order in which\n       they arrived. Likewise, multiple greenlets that block on a call to :meth:`get` for\n       an empty queue will now receive items in the order in which they blocked. An\n       implementation quirk under CPython *usually* ensured this was roughly the case\n       previously anyway, but that wasn't the case for PyPy.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_iter, (void *)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_45__iter__},
  {Py_tp_iternext, (void *)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_init, (void *)__pyx_pw_6gevent_14_gevent_cqueue_5Queue_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_14_gevent_cqueue_Queue},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_14_gevent_cqueue_Queue_spec = {
  "gevent._gevent_cqueue.Queue",
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6gevent_14_gevent_cqueue_Queue_slots,
};
#else

static PyNumberMethods __pyx_tp_as_number_Queue = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_25__nonzero__, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Queue = {
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_21__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Queue = {
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_21__len__, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6gevent_14_gevent_cqueue_Queue = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent._gevent_cqueue.""Queue", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_14_gevent_cqueue_Queue, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_13__repr__, /*tp_repr*/
  &__pyx_tp_as_number_Queue, /*tp_as_number*/
  &__pyx_tp_as_sequence_Queue, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Queue, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_15__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("Queue(maxsize=None, items=(), _warn_depth=2)\n\n    Create a queue object with a given maximum size.\n\n    If *maxsize* is less than or equal to zero or ``None``, the queue\n    size is infinite.\n\n    Queues have a ``len`` equal to the number of items in them (the :meth:`qsize`),\n    but in a boolean context they are always True.\n\n    .. versionchanged:: 1.1b3\n       Queues now support :func:`len`; it behaves the same as :meth:`qsize`.\n    .. versionchanged:: 1.1b3\n       Multiple greenlets that block on a call to :meth:`put` for a full queue\n       will now be awakened to put their items into the queue in the order in which\n       they arrived. Likewise, multiple greenlets that block on a call to :meth:`get` for\n       an empty queue will now receive items in the order in which they blocked. An\n       implementation quirk under CPython *usually* ensured this was roughly the case\n       previously anyway, but that wasn't the case for PyPy.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue, /*tp_traverse*/
  __pyx_tp_clear_6gevent_14_gevent_cqueue_Queue, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_45__iter__, /*tp_iter*/
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__, /*tp_iternext*/
  __pyx_methods_6gevent_14_gevent_cqueue_Queue, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_14_gevent_cqueue_Queue, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_14_gevent_cqueue_Queue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_ItemWaiter __pyx_vtable_6gevent_14_gevent_cqueue_ItemWaiter;

static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_ItemWaiter(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *p;
  #if CYTHON_COMPILING_IN_LIMITED_API
  newfunc new_func = (newfunc)PyType_GetSlot(__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter, Py_tp_new);
  PyObject *o = new_func(t, a, k);
  #else
  PyObject *o = __pyx_ptype_6gevent_16_gevent_c_waiter_Waiter->tp_new(t, a, k);
  #endif
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter*)__pyx_vtabptr_6gevent_14_gevent_cqueue_ItemWaiter;
  p->item = Py_None; Py_INCREF(Py_None);
  p->queue = ((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)Py_None); Py_INCREF(Py_None);
  return o;
}

#if !CYTHON_COMPILING_IN_LIMITED_API
static void __pyx_tp_dealloc_6gevent_14_gevent_cqueue_ItemWaiter(PyObject *o) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->item);
  Py_CLEAR(p->queue);
  PyObject_GC_Track(o);
  if (likely(__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter)) __pyx_ptype_6gevent_16_gevent_c_waiter_Waiter->tp_dealloc(o); else __Pyx_call_next_tp_dealloc(o, __pyx_tp_dealloc_6gevent_14_gevent_cqueue_ItemWaiter);
}
#endif

static int __pyx_tp_traverse_6gevent_14_gevent_cqueue_ItemWaiter(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)o;
  e = ((likely(__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter)) ? ((__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter->tp_traverse) ? __pyx_ptype_6gevent_16_gevent_c_waiter_Waiter->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_6gevent_14_gevent_cqueue_ItemWaiter)); if (e) return e;
  if (p->item) {
    e = (*v)(p->item, a); if (e) return e;
  }
  if (p->queue) {
    e = (*v)(((PyObject *)p->queue), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6gevent_14_gevent_cqueue_ItemWaiter(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter *)o;
  if (likely(__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter)) { if (__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter->tp_clear) __pyx_ptype_6gevent_16_gevent_c_waiter_Waiter->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_6gevent_14_gevent_cqueue_ItemWaiter);
  tmp = ((PyObject*)p->item);
  p->item = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->queue);
  p->queue = ((struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_10ItemWaiter_item(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_4item_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_10ItemWaiter_queue(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_5queue_1__get__(o);
}

static PyMethodDef __pyx_methods_6gevent_14_gevent_cqueue_ItemWaiter[] = {
  {"put_and_switch", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_3put_and_switch, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_10ItemWaiter_2put_and_switch},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_14_gevent_cqueue_ItemWaiter[] = {
  {(char *)"item", __pyx_getprop_6gevent_14_gevent_cqueue_10ItemWaiter_item, 0, (char *)0, 0},
  {(char *)"queue", __pyx_getprop_6gevent_14_gevent_cqueue_10ItemWaiter_queue, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
static PyType_Slot __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter_slots[] = {
  {Py_tp_getattro, (void *)PyObject_GenericGetAttr},
  {Py_tp_doc, (void *)PyDoc_STR("ItemWaiter(item, queue)")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_14_gevent_cqueue_ItemWaiter},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_14_gevent_cqueue_ItemWaiter},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_14_gevent_cqueue_ItemWaiter},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_14_gevent_cqueue_ItemWaiter},
  {Py_tp_init, (void *)__pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_14_gevent_cqueue_ItemWaiter},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter_spec = {
  "gevent._gevent_cqueue.ItemWaiter",
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter_slots,
};
#else

static PyTypeObject __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent._gevent_cqueue.""ItemWaiter", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_ItemWaiter), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_14_gevent_cqueue_ItemWaiter, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("ItemWaiter(item, queue)"), /*tp_doc*/
  __pyx_tp_traverse_6gevent_14_gevent_cqueue_ItemWaiter, /*tp_traverse*/
  __pyx_tp_clear_6gevent_14_gevent_cqueue_ItemWaiter, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6gevent_14_gevent_cqueue_ItemWaiter, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_14_gevent_cqueue_ItemWaiter, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6gevent_14_gevent_cqueue_10ItemWaiter_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_14_gevent_cqueue_ItemWaiter, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_UnboundQueue __pyx_vtable_6gevent_14_gevent_cqueue_UnboundQueue;

static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_UnboundQueue(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *p;
  #if CYTHON_COMPILING_IN_LIMITED_API
  newfunc new_func = (newfunc)PyType_GetSlot(__pyx_ptype_6gevent_14_gevent_cqueue_Queue, Py_tp_new);
  PyObject *o = new_func(t, a, k);
  #else
  PyObject *o = __pyx_tp_new_6gevent_14_gevent_cqueue_Queue(t, a, k);
  #endif
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue*)__pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue;
  return o;
}

static PyMethodDef __pyx_methods_6gevent_14_gevent_cqueue_UnboundQueue[] = {
  {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
static PyType_Slot __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue_slots[] = {
  {Py_tp_getattro, (void *)PyObject_GenericGetAttr},
  {Py_tp_doc, (void *)PyDoc_STR("UnboundQueue(maxsize=None, items=())")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_14_gevent_cqueue_UnboundQueue},
  {Py_tp_init, (void *)__pyx_pw_6gevent_14_gevent_cqueue_12UnboundQueue_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_14_gevent_cqueue_UnboundQueue},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue_spec = {
  "gevent._gevent_cqueue.UnboundQueue",
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue_slots,
};
#else

static PyTypeObject __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent._gevent_cqueue.""UnboundQueue", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_14_gevent_cqueue_Queue, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_15__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("UnboundQueue(maxsize=None, items=())"), /*tp_doc*/
  __pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue, /*tp_traverse*/
  __pyx_tp_clear_6gevent_14_gevent_cqueue_Queue, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_45__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_6gevent_14_gevent_cqueue_UnboundQueue, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6gevent_14_gevent_cqueue_12UnboundQueue_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_14_gevent_cqueue_UnboundQueue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_PriorityQueue __pyx_vtable_6gevent_14_gevent_cqueue_PriorityQueue;

static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_PriorityQueue(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *p;
  #if CYTHON_COMPILING_IN_LIMITED_API
  newfunc new_func = (newfunc)PyType_GetSlot(__pyx_ptype_6gevent_14_gevent_cqueue_Queue, Py_tp_new);
  PyObject *o = new_func(t, a, k);
  #else
  PyObject *o = __pyx_tp_new_6gevent_14_gevent_cqueue_Queue(t, a, k);
  #endif
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue*)__pyx_vtabptr_6gevent_14_gevent_cqueue_PriorityQueue;
  return o;
}

static PyMethodDef __pyx_methods_6gevent_14_gevent_cqueue_PriorityQueue[] = {
  {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
static PyType_Slot __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue_slots[] = {
  {Py_tp_getattro, (void *)PyObject_GenericGetAttr},
  {Py_tp_doc, (void *)PyDoc_STR("A subclass of :class:`Queue` that retrieves entries in priority order (lowest first).\n\n    Entries are typically tuples of the form: ``(priority number, data)``.\n\n    .. versionchanged:: 1.2a1\n       Any *items* given to the constructor will now be passed through\n       :func:`heapq.heapify` to ensure the invariants of this class hold.\n       Previously it was just assumed that they were already a heap.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_14_gevent_cqueue_PriorityQueue},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_14_gevent_cqueue_PriorityQueue},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue_spec = {
  "gevent._gevent_cqueue.PriorityQueue",
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue_slots,
};
#else

static PyTypeObject __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent._gevent_cqueue.""PriorityQueue", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_14_gevent_cqueue_Queue, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_15__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("A subclass of :class:`Queue` that retrieves entries in priority order (lowest first).\n\n    Entries are typically tuples of the form: ``(priority number, data)``.\n\n    .. versionchanged:: 1.2a1\n       Any *items* given to the constructor will now be passed through\n       :func:`heapq.heapify` to ensure the invariants of this class hold.\n       Previously it was just assumed that they were already a heap.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue, /*tp_traverse*/
  __pyx_tp_clear_6gevent_14_gevent_cqueue_Queue, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_45__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_6gevent_14_gevent_cqueue_PriorityQueue, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_14_gevent_cqueue_PriorityQueue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_LifoQueue __pyx_vtable_6gevent_14_gevent_cqueue_LifoQueue;

static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_LifoQueue(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *p;
  #if CYTHON_COMPILING_IN_LIMITED_API
  newfunc new_func = (newfunc)PyType_GetSlot(__pyx_ptype_6gevent_14_gevent_cqueue_Queue, Py_tp_new);
  PyObject *o = new_func(t, a, k);
  #else
  PyObject *o = __pyx_tp_new_6gevent_14_gevent_cqueue_Queue(t, a, k);
  #endif
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue*)__pyx_vtabptr_6gevent_14_gevent_cqueue_LifoQueue;
  return o;
}

static PyMethodDef __pyx_methods_6gevent_14_gevent_cqueue_LifoQueue[] = {
  {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
static PyType_Slot __pyx_type_6gevent_14_gevent_cqueue_LifoQueue_slots[] = {
  {Py_tp_getattro, (void *)PyObject_GenericGetAttr},
  {Py_tp_doc, (void *)PyDoc_STR("A subclass of :class:`Queue` that retrieves most recently added entries first.")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_14_gevent_cqueue_Queue},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_14_gevent_cqueue_LifoQueue},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_14_gevent_cqueue_LifoQueue},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_14_gevent_cqueue_LifoQueue_spec = {
  "gevent._gevent_cqueue.LifoQueue",
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6gevent_14_gevent_cqueue_LifoQueue_slots,
};
#else

static PyTypeObject __pyx_type_6gevent_14_gevent_cqueue_LifoQueue = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent._gevent_cqueue.""LifoQueue", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_14_gevent_cqueue_Queue, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_15__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("A subclass of :class:`Queue` that retrieves most recently added entries first."), /*tp_doc*/
  __pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue, /*tp_traverse*/
  __pyx_tp_clear_6gevent_14_gevent_cqueue_Queue, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_45__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_6gevent_14_gevent_cqueue_LifoQueue, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_1__init__, /*tp_init*/
  #else
  0, /*tp_init*/
  #endif
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_14_gevent_cqueue_LifoQueue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_JoinableQueue __pyx_vtable_6gevent_14_gevent_cqueue_JoinableQueue;

static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_JoinableQueue(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *p;
  #if CYTHON_COMPILING_IN_LIMITED_API
  newfunc new_func = (newfunc)PyType_GetSlot(__pyx_ptype_6gevent_14_gevent_cqueue_Queue, Py_tp_new);
  PyObject *o = new_func(t, a, k);
  #else
  PyObject *o = __pyx_tp_new_6gevent_14_gevent_cqueue_Queue(t, a, k);
  #endif
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Queue*)__pyx_vtabptr_6gevent_14_gevent_cqueue_JoinableQueue;
  p->_cond = ((struct __pyx_obj_6gevent_14_gevent_cevent_Event *)Py_None); Py_INCREF(Py_None);
  return o;
}

#if !CYTHON_COMPILING_IN_LIMITED_API
static void __pyx_tp_dealloc_6gevent_14_gevent_cqueue_JoinableQueue(PyObject *o) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_cond);
  PyObject_GC_Track(o);
  __pyx_tp_dealloc_6gevent_14_gevent_cqueue_Queue(o);
}
#endif

static int __pyx_tp_traverse_6gevent_14_gevent_cqueue_JoinableQueue(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)o;
  e = __pyx_tp_traverse_6gevent_14_gevent_cqueue_Queue(o, v, a); if (e) return e;
  if (p->_cond) {
    e = (*v)(((PyObject *)p->_cond), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6gevent_14_gevent_cqueue_JoinableQueue(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue *)o;
  __pyx_tp_clear_6gevent_14_gevent_cqueue_Queue(o);
  tmp = ((PyObject*)p->_cond);
  p->_cond = ((struct __pyx_obj_6gevent_14_gevent_cevent_Event *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_13JoinableQueue_unfinished_tasks(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_16unfinished_tasks_1__get__(o);
}

static PyMethodDef __pyx_methods_6gevent_14_gevent_cqueue_JoinableQueue[] = {
  {"copy", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_3copy, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_2copy},
  {"_format", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_5_format, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_4_format},
  {"task_done", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_9task_done, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_8task_done},
  {"join", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_11join, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue_10join},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_14_gevent_cqueue_JoinableQueue[] = {
  {(char *)"unfinished_tasks", __pyx_getprop_6gevent_14_gevent_cqueue_13JoinableQueue_unfinished_tasks, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
static PyType_Slot __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue_slots[] = {
  {Py_tp_getattro, (void *)PyObject_GenericGetAttr},
  {Py_tp_doc, (void *)PyDoc_STR("JoinableQueue(maxsize=None, items=(), unfinished_tasks=None)\n\n    A subclass of :class:`Queue` that additionally has\n    :meth:`task_done` and :meth:`join` methods.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_14_gevent_cqueue_JoinableQueue},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_14_gevent_cqueue_JoinableQueue},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_14_gevent_cqueue_JoinableQueue},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_14_gevent_cqueue_JoinableQueue},
  {Py_tp_init, (void *)__pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_14_gevent_cqueue_JoinableQueue},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue_spec = {
  "gevent._gevent_cqueue.JoinableQueue",
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue_slots,
};
#else

static PyTypeObject __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent._gevent_cqueue.""JoinableQueue", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_14_gevent_cqueue_JoinableQueue, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_13__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_15__str__, /*tp_str*/
  #else
  0, /*tp_str*/
  #endif
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("JoinableQueue(maxsize=None, items=(), unfinished_tasks=None)\n\n    A subclass of :class:`Queue` that additionally has\n    :meth:`task_done` and :meth:`join` methods.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6gevent_14_gevent_cqueue_JoinableQueue, /*tp_traverse*/
  __pyx_tp_clear_6gevent_14_gevent_cqueue_JoinableQueue, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_45__iter__, /*tp_iter*/
  #else
  0, /*tp_iter*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY
  __pyx_pw_6gevent_14_gevent_cqueue_5Queue_47__next__, /*tp_iternext*/
  #else
  0, /*tp_iternext*/
  #endif
  __pyx_methods_6gevent_14_gevent_cqueue_JoinableQueue, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_14_gevent_cqueue_JoinableQueue, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6gevent_14_gevent_cqueue_13JoinableQueue_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_14_gevent_cqueue_JoinableQueue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
#endif
static struct __pyx_vtabstruct_6gevent_14_gevent_cqueue_Channel __pyx_vtable_6gevent_14_gevent_cqueue_Channel;

static PyObject *__pyx_tp_new_6gevent_14_gevent_cqueue_Channel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *p;
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  #endif
  p = ((struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)o);
  p->__pyx_vtab = __pyx_vtabptr_6gevent_14_gevent_cqueue_Channel;
  p->getters = Py_None; Py_INCREF(Py_None);
  p->putters = Py_None; Py_INCREF(Py_None);
  p->hub = Py_None; Py_INCREF(Py_None);
  p->_event_unlock = Py_None; Py_INCREF(Py_None);
  return o;
}

#if !CYTHON_COMPILING_IN_LIMITED_API
static void __pyx_tp_dealloc_6gevent_14_gevent_cqueue_Channel(PyObject *o) {
  struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  if (p->__weakref__) PyObject_ClearWeakRefs(o);
  Py_CLEAR(p->getters);
  Py_CLEAR(p->putters);
  Py_CLEAR(p->hub);
  Py_CLEAR(p->_event_unlock);
  (*Py_TYPE(o)->tp_free)(o);
}
#endif

static int __pyx_tp_traverse_6gevent_14_gevent_cqueue_Channel(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)o;
  if (p->getters) {
    e = (*v)(p->getters, a); if (e) return e;
  }
  if (p->putters) {
    e = (*v)(p->putters, a); if (e) return e;
  }
  if (p->hub) {
    e = (*v)(p->hub, a); if (e) return e;
  }
  if (p->_event_unlock) {
    e = (*v)(p->_event_unlock, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6gevent_14_gevent_cqueue_Channel(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *p = (struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *)o;
  tmp = ((PyObject*)p->getters);
  p->getters = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->putters);
  p->putters = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->hub);
  p->hub = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_event_unlock);
  p->_event_unlock = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_7Channel_balance(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_7Channel_7balance_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_7Channel_getters(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_7Channel_7getters_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_7Channel_putters(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_7Channel_7putters_1__get__(o);
}

static PyObject *__pyx_getprop_6gevent_14_gevent_cqueue_7Channel_hub(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6gevent_14_gevent_cqueue_7Channel_3hub_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6gevent_14_gevent_cqueue_7Channel_27__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {return __pyx_pw_6gevent_14_gevent_cqueue_7Channel_27__next__(self);}

static PyMethodDef __pyx_methods_6gevent_14_gevent_cqueue_Channel[] = {
  {"_format", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_7_format, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_6_format},
  {"qsize", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_9qsize, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_8qsize},
  {"empty", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_11empty, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_10empty},
  {"full", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_13full, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_12full},
  {"put", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_15put, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_14put},
  {"put_nowait", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_17put_nowait, METH_O, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_16put_nowait},
  {"_unlock", (PyCFunction)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_23_unlock, METH_NOARGS, __pyx_doc_6gevent_14_gevent_cqueue_7Channel_22_unlock},
  {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_6gevent_14_gevent_cqueue_7Channel_27__next__, METH_NOARGS|METH_COEXIST, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6gevent_14_gevent_cqueue_Channel[] = {
  {(char *)"balance", __pyx_getprop_6gevent_14_gevent_cqueue_7Channel_balance, 0, (char *)0, 0},
  {(char *)"getters", __pyx_getprop_6gevent_14_gevent_cqueue_7Channel_getters, 0, (char *)0, 0},
  {(char *)"putters", __pyx_getprop_6gevent_14_gevent_cqueue_7Channel_putters, 0, (char *)0, 0},
  {(char *)"hub", __pyx_getprop_6gevent_14_gevent_cqueue_7Channel_hub, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
static PyType_Slot __pyx_type_6gevent_14_gevent_cqueue_Channel_slots[] = {
  {Py_tp_repr, (void *)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_3__repr__},
  {Py_tp_str, (void *)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_5__str__},
  {Py_tp_getattro, (void *)PyObject_GenericGetAttr},
  {Py_tp_doc, (void *)PyDoc_STR("Channel(maxsize=1)")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6gevent_14_gevent_cqueue_Channel},
  {Py_tp_clear, (void *)__pyx_tp_clear_6gevent_14_gevent_cqueue_Channel},
  {Py_tp_iter, (void *)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_25__iter__},
  {Py_tp_iternext, (void *)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_27__next__},
  {Py_tp_methods, (void *)__pyx_methods_6gevent_14_gevent_cqueue_Channel},
  {Py_tp_getset, (void *)__pyx_getsets_6gevent_14_gevent_cqueue_Channel},
  {Py_tp_init, (void *)__pyx_pw_6gevent_14_gevent_cqueue_7Channel_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6gevent_14_gevent_cqueue_Channel},
  {0, 0},
};
static PyType_Spec __pyx_type_6gevent_14_gevent_cqueue_Channel_spec = {
  "gevent._gevent_cqueue.Channel",
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_6gevent_14_gevent_cqueue_Channel_slots,
};
#else

static PyTypeObject __pyx_type_6gevent_14_gevent_cqueue_Channel = {
  PyVarObject_HEAD_INIT(0, 0)
  "gevent._gevent_cqueue.""Channel", /*tp_name*/
  sizeof(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6gevent_14_gevent_cqueue_Channel, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_6gevent_14_gevent_cqueue_7Channel_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_6gevent_14_gevent_cqueue_7Channel_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  PyDoc_STR("Channel(maxsize=1)"), /*tp_doc*/
  __pyx_tp_traverse_6gevent_14_gevent_cqueue_Channel, /*tp_traverse*/
  __pyx_tp_clear_6gevent_14_gevent_cqueue_Channel, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pw_6gevent_14_gevent_cqueue_7Channel_25__iter__, /*tp_iter*/
  __pyx_pw_6gevent_14_gevent_cqueue_7Channel_27__next__, /*tp_iternext*/
  __pyx_methods_6gevent_14_gevent_cqueue_Channel, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6gevent_14_gevent_cqueue_Channel, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_6gevent_14_gevent_cqueue_7Channel_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6gevent_14_gevent_cqueue_Channel, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  #if CYTHON_COMPILING_IN_LIMITED_API
  {0, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 1},
  {0, __pyx_k_Channel, sizeof(__pyx_k_Channel), 0, 0, 1, 1},
  {0, __pyx_k_Channel__format, sizeof(__pyx_k_Channel__format), 0, 0, 1, 1},
  {0, __pyx_k_Channel__unlock, sizeof(__pyx_k_Channel__unlock), 0, 0, 1, 1},
  {0, __pyx_k_Channel_empty, sizeof(__pyx_k_Channel_empty), 0, 0, 1, 1},
  {0, __pyx_k_Channel_full, sizeof(__pyx_k_Channel_full), 0, 0, 1, 1},
  {0, __pyx_k_Channel_get, sizeof(__pyx_k_Channel_get), 0, 0, 1, 1},
  {0, __pyx_k_Channel_get_nowait, sizeof(__pyx_k_Channel_get_nowait), 0, 0, 1, 1},
  {0, __pyx_k_Channel_put, sizeof(__pyx_k_Channel_put), 0, 0, 1, 1},
  {0, __pyx_k_Channel_put_nowait, sizeof(__pyx_k_Channel_put_nowait), 0, 0, 1, 1},
  {0, __pyx_k_Channel_qsize, sizeof(__pyx_k_Channel_qsize), 0, 0, 1, 1},
  {0, __pyx_k_Channels_have_a_maxsize_of_1, sizeof(__pyx_k_Channels_have_a_maxsize_of_1), 0, 0, 1, 0},
  {0, __pyx_k_DeprecationWarning, sizeof(__pyx_k_DeprecationWarning), 0, 0, 1, 1},
  {0, __pyx_k_Empty, sizeof(__pyx_k_Empty), 0, 0, 1, 1},
  {0, __pyx_k_Empty_2, sizeof(__pyx_k_Empty_2), 0, 0, 1, 1},
  {0, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
  {0, __pyx_k_Full, sizeof(__pyx_k_Full), 0, 0, 1, 1},
  {0, __pyx_k_Full_2, sizeof(__pyx_k_Full_2), 0, 0, 1, 1},
  {0, __pyx_k_InvalidSwitchError, sizeof(__pyx_k_InvalidSwitchError), 0, 0, 1, 1},
  {0, __pyx_k_Invalid_switch_into_Channel_put, sizeof(__pyx_k_Invalid_switch_into_Channel_put), 0, 0, 1, 0},
  {0, __pyx_k_Invalid_switch_into_Queue_get_r, sizeof(__pyx_k_Invalid_switch_into_Queue_get_r), 0, 0, 1, 0},
  {0, __pyx_k_Invalid_switch_into_Queue_put_r, sizeof(__pyx_k_Invalid_switch_into_Queue_put_r), 0, 0, 1, 0},
  {0, __pyx_k_ItemWaiter, sizeof(__pyx_k_ItemWaiter), 0, 0, 1, 1},
  {0, __pyx_k_ItemWaiter_put_and_switch, sizeof(__pyx_k_ItemWaiter_put_and_switch), 0, 0, 1, 1},
  {0, __pyx_k_JoinableQueue, sizeof(__pyx_k_JoinableQueue), 0, 0, 1, 1},
  {0, __pyx_k_JoinableQueue__format, sizeof(__pyx_k_JoinableQueue__format), 0, 0, 1, 1},
  {0, __pyx_k_JoinableQueue__put, sizeof(__pyx_k_JoinableQueue__put), 0, 0, 1, 1},
  {0, __pyx_k_JoinableQueue_copy, sizeof(__pyx_k_JoinableQueue_copy), 0, 0, 1, 1},
  {0, __pyx_k_JoinableQueue_join, sizeof(__pyx_k_JoinableQueue_join), 0, 0, 1, 1},
  {0, __pyx_k_JoinableQueue_task_done, sizeof(__pyx_k_JoinableQueue_task_done), 0, 0, 1, 1},
  {0, __pyx_k_LifoQueue, sizeof(__pyx_k_LifoQueue), 0, 0, 1, 1},
  {0, __pyx_k_LifoQueue__create_queue, sizeof(__pyx_k_LifoQueue__create_queue), 0, 0, 1, 1},
  {0, __pyx_k_LifoQueue__get, sizeof(__pyx_k_LifoQueue__get), 0, 0, 1, 1},
  {0, __pyx_k_LifoQueue__peek, sizeof(__pyx_k_LifoQueue__peek), 0, 0, 1, 1},
  {0, __pyx_k_LifoQueue__put, sizeof(__pyx_k_LifoQueue__put), 0, 0, 1, 1},
  {0, __pyx_k_PriorityQueue, sizeof(__pyx_k_PriorityQueue), 0, 0, 1, 1},
  {0, __pyx_k_PriorityQueue__create_queue, sizeof(__pyx_k_PriorityQueue__create_queue), 0, 0, 1, 1},
  {0, __pyx_k_PriorityQueue__get, sizeof(__pyx_k_PriorityQueue__get), 0, 0, 1, 1},
  {0, __pyx_k_PriorityQueue__put, sizeof(__pyx_k_PriorityQueue__put), 0, 0, 1, 1},
  {0, __pyx_k_PySimpleQueue, sizeof(__pyx_k_PySimpleQueue), 0, 0, 1, 1},
  {0, __pyx_k_Queue, sizeof(__pyx_k_Queue), 0, 0, 1, 1},
  {0, __pyx_k_Queue_0_now_equivalent_to_Queue, sizeof(__pyx_k_Queue_0_now_equivalent_to_Queue), 0, 0, 1, 0},
  {0, __pyx_k_Queue__create_queue, sizeof(__pyx_k_Queue__create_queue), 0, 0, 1, 1},
  {0, __pyx_k_Queue__format, sizeof(__pyx_k_Queue__format), 0, 0, 1, 1},
  {0, __pyx_k_Queue__get, sizeof(__pyx_k_Queue__get), 0, 0, 1, 1},
  {0, __pyx_k_Queue__peek, sizeof(__pyx_k_Queue__peek), 0, 0, 1, 1},
  {0, __pyx_k_Queue__put, sizeof(__pyx_k_Queue__put), 0, 0, 1, 1},
  {0, __pyx_k_Queue__unlock, sizeof(__pyx_k_Queue__unlock), 0, 0, 1, 1},
  {0, __pyx_k_Queue_copy, sizeof(__pyx_k_Queue_copy), 0, 0, 1, 1},
  {0, __pyx_k_Queue_empty, sizeof(__pyx_k_Queue_empty), 0, 0, 1, 1},
  {0, __pyx_k_Queue_full, sizeof(__pyx_k_Queue_full), 0, 0, 1, 1},
  {0, __pyx_k_Queue_get, sizeof(__pyx_k_Queue_get), 0, 0, 1, 1},
  {0, __pyx_k_Queue_get_nowait, sizeof(__pyx_k_Queue_get_nowait), 0, 0, 1, 1},
  {0, __pyx_k_Queue_peek, sizeof(__pyx_k_Queue_peek), 0, 0, 1, 1},
  {0, __pyx_k_Queue_peek_nowait, sizeof(__pyx_k_Queue_peek_nowait), 0, 0, 1, 1},
  {0, __pyx_k_Queue_put, sizeof(__pyx_k_Queue_put), 0, 0, 1, 1},
  {0, __pyx_k_Queue_put_nowait, sizeof(__pyx_k_Queue_put_nowait), 0, 0, 1, 1},
  {0, __pyx_k_Queue_qsize, sizeof(__pyx_k_Queue_qsize), 0, 0, 1, 1},
  {0, __pyx_k_SimpleQueue, sizeof(__pyx_k_SimpleQueue), 0, 0, 1, 1},
  {0, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {0, __pyx_k_Timeout, sizeof(__pyx_k_Timeout), 0, 0, 1, 1},
  {0, __pyx_k_UnboundQueue, sizeof(__pyx_k_UnboundQueue), 0, 0, 1, 1},
  {0, __pyx_k_UnboundQueue_has_no_maxsize, sizeof(__pyx_k_UnboundQueue_has_no_maxsize), 0, 0, 1, 0},
  {0, __pyx_k_UnboundQueue_put, sizeof(__pyx_k_UnboundQueue_put), 0, 0, 1, 1},
  {0, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {0, __pyx_k_Waiter, sizeof(__pyx_k_Waiter), 0, 0, 1, 1},
  {0, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {0, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
  {0, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {0, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {0, __pyx_k_block, sizeof(__pyx_k_block), 0, 0, 1, 1},
  {0, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1},
  {0, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  {0, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {0, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {0, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {0, __pyx_k_cond, sizeof(__pyx_k_cond), 0, 0, 1, 1},
  {0, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {0, __pyx_k_create_queue, sizeof(__pyx_k_create_queue), 0, 0, 1, 1},
  {0, __pyx_k_deque, sizeof(__pyx_k_deque), 0, 0, 1, 1},
  {0, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {0, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
  {0, __pyx_k_event_unlock, sizeof(__pyx_k_event_unlock), 0, 0, 1, 1},
  {0, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
  {0, __pyx_k_extensions, sizeof(__pyx_k_extensions), 0, 0, 1, 1},
  {0, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {0, __pyx_k_full, sizeof(__pyx_k_full), 0, 0, 1, 1},
  {0, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {0, __pyx_k_get_2, sizeof(__pyx_k_get_2), 0, 0, 1, 1},
  {0, __pyx_k_get_hub_noargs, sizeof(__pyx_k_get_hub_noargs), 0, 0, 1, 1},
  {0, __pyx_k_get_nowait, sizeof(__pyx_k_get_nowait), 0, 0, 1, 1},
  {0, __pyx_k_getcurrent, sizeof(__pyx_k_getcurrent), 0, 0, 1, 1},
  {0, __pyx_k_getter, sizeof(__pyx_k_getter), 0, 0, 1, 1},
  {0, __pyx_k_getters, sizeof(__pyx_k_getters), 0, 0, 1, 1},
  {0, __pyx_k_getters_s, sizeof(__pyx_k_getters_s), 0, 0, 1, 0},
  {0, __pyx_k_getters_s_2, sizeof(__pyx_k_getters_s_2), 0, 0, 1, 0},
  {0, __pyx_k_gevent, sizeof(__pyx_k_gevent), 0, 0, 1, 1},
  {0, __pyx_k_gevent__gevent_cqueue, sizeof(__pyx_k_gevent__gevent_cqueue), 0, 0, 1, 1},
  {0, __pyx_k_gevent__hub_local, sizeof(__pyx_k_gevent__hub_local), 0, 0, 1, 1},
  {0, __pyx_k_gevent__queue, sizeof(__pyx_k_gevent__queue), 0, 0, 1, 0},
  {0, __pyx_k_gevent__util, sizeof(__pyx_k_gevent__util), 0, 0, 1, 1},
  {0, __pyx_k_gevent__waiter, sizeof(__pyx_k_gevent__waiter), 0, 0, 1, 1},
  {0, __pyx_k_gevent_event, sizeof(__pyx_k_gevent_event), 0, 0, 1, 1},
  {0, __pyx_k_gevent_exceptions, sizeof(__pyx_k_gevent_exceptions), 0, 0, 1, 1},
  {0, __pyx_k_gevent_timeout, sizeof(__pyx_k_gevent_timeout), 0, 0, 1, 1},
  {0, __pyx_k_greenlet, sizeof(__pyx_k_greenlet), 0, 0, 1, 1},
  {0, __pyx_k_greenlet_imported, sizeof(__pyx_k_greenlet_imported), 0, 0, 1, 1},
  {0, __pyx_k_greenlet_init, sizeof(__pyx_k_greenlet_init), 0, 0, 1, 1},
  {0, __pyx_k_heapify, sizeof(__pyx_k_heapify), 0, 0, 1, 1},
  {0, __pyx_k_heapify_2, sizeof(__pyx_k_heapify_2), 0, 0, 1, 1},
  {0, __pyx_k_heappop, sizeof(__pyx_k_heappop), 0, 0, 1, 1},
  {0, __pyx_k_heappop_2, sizeof(__pyx_k_heappop_2), 0, 0, 1, 1},
  {0, __pyx_k_heappush, sizeof(__pyx_k_heappush), 0, 0, 1, 1},
  {0, __pyx_k_heappush_2, sizeof(__pyx_k_heappush_2), 0, 0, 1, 1},
  {0, __pyx_k_heapq, sizeof(__pyx_k_heapq), 0, 0, 1, 1},
  {0, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1},
  {0, __pyx_k_hub, sizeof(__pyx_k_hub), 0, 0, 1, 1},
  {0, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {0, __pyx_k_implements, sizeof(__pyx_k_implements), 0, 0, 1, 1},
  {0, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {0, __pyx_k_import_c_accel, sizeof(__pyx_k_import_c_accel), 0, 0, 1, 1},
  {0, __pyx_k_imports, sizeof(__pyx_k_imports), 0, 0, 1, 1},
  {0, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {0, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1},
  {0, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
  {0, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {0, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {0, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {0, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1},
  {0, __pyx_k_loop, sizeof(__pyx_k_loop), 0, 0, 1, 1},
  {0, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {0, __pyx_k_maxsize, sizeof(__pyx_k_maxsize), 0, 0, 1, 1},
  {0, __pyx_k_maxsize_2, sizeof(__pyx_k_maxsize_2), 0, 0, 1, 1},
  {0, __pyx_k_maxsize_r, sizeof(__pyx_k_maxsize_r), 0, 0, 1, 0},
  {0, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {0, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
  {0, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1},
  {0, __pyx_k_peek, sizeof(__pyx_k_peek), 0, 0, 1, 1},
  {0, __pyx_k_peek_2, sizeof(__pyx_k_peek_2), 0, 0, 1, 1},
  {0, __pyx_k_peek_nowait, sizeof(__pyx_k_peek_nowait), 0, 0, 1, 1},
  {0, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {0, __pyx_k_popleft, sizeof(__pyx_k_popleft), 0, 0, 1, 1},
  {0, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1},
  {0, __pyx_k_put_2, sizeof(__pyx_k_put_2), 0, 0, 1, 1},
  {0, __pyx_k_put_and_switch, sizeof(__pyx_k_put_and_switch), 0, 0, 1, 1},
  {0, __pyx_k_put_nowait, sizeof(__pyx_k_put_nowait), 0, 0, 1, 1},
  {0, __pyx_k_putter, sizeof(__pyx_k_putter), 0, 0, 1, 1},
  {0, __pyx_k_putters, sizeof(__pyx_k_putters), 0, 0, 1, 1},
  {0, __pyx_k_putters_s, sizeof(__pyx_k_putters_s), 0, 0, 1, 0},
  {0, __pyx_k_putters_s_2, sizeof(__pyx_k_putters_s_2), 0, 0, 1, 0},
  {0, __pyx_k_pyx_capi, sizeof(__pyx_k_pyx_capi), 0, 0, 1, 1},
  {0, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {0, __pyx_k_qsize, sizeof(__pyx_k_qsize), 0, 0, 1, 1},
  {0, __pyx_k_queue, sizeof(__pyx_k_queue), 0, 0, 1, 1},
  {0, __pyx_k_queue_2, sizeof(__pyx_k_queue_2), 0, 0, 1, 1},
  {0, __pyx_k_queue_r, sizeof(__pyx_k_queue_r), 0, 0, 1, 0},
  {0, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {0, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
  {0, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {0, __pyx_k_run_callback, sizeof(__pyx_k_run_callback), 0, 0, 1, 1},
  {0, __pyx_k_s_at_s_s, sizeof(__pyx_k_s_at_s_s), 0, 0, 1, 0},
  {0, __pyx_k_s_at_s_s_2, sizeof(__pyx_k_s_at_s_s_2), 0, 0, 1, 0},
  {0, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
  {0, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0},
  {0, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {0, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
  {0, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1},
  {0, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {0, __pyx_k_src_gevent_queue_py, sizeof(__pyx_k_src_gevent_queue_py), 0, 0, 1, 0},
  {0, __pyx_k_stacklevel, sizeof(__pyx_k_stacklevel), 0, 0, 1, 1},
  {0, __pyx_k_start_new_or_dummy, sizeof(__pyx_k_start_new_or_dummy), 0, 0, 1, 1},
  {0, __pyx_k_switch, sizeof(__pyx_k_switch), 0, 0, 1, 1},
  {0, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {0, __pyx_k_task_done, sizeof(__pyx_k_task_done), 0, 0, 1, 1},
  {0, __pyx_k_task_done_called_too_many_times, sizeof(__pyx_k_task_done_called_too_many_times), 0, 0, 1, 0},
  {0, __pyx_k_tasks_s__cond_s, sizeof(__pyx_k_tasks_s__cond_s), 0, 0, 1, 0},
  {0, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {0, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {0, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
  {0, __pyx_k_unfinished_tasks, sizeof(__pyx_k_unfinished_tasks), 0, 0, 1, 1},
  {0, __pyx_k_unlock, sizeof(__pyx_k_unlock), 0, 0, 1, 1},
  {0, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
  {0, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1},
  {0, __pyx_k_waiter, sizeof(__pyx_k_waiter), 0, 0, 1, 1},
  {0, __pyx_k_waiter_2, sizeof(__pyx_k_waiter_2), 0, 0, 1, 1},
  {0, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {0, __pyx_k_warn_depth, sizeof(__pyx_k_warn_depth), 0, 0, 1, 1},
  {0, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {0, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1},
  #else
  {&__pyx_n_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 1},
  {&__pyx_n_s_Channel, __pyx_k_Channel, sizeof(__pyx_k_Channel), 0, 0, 1, 1},
  {&__pyx_n_s_Channel__format, __pyx_k_Channel__format, sizeof(__pyx_k_Channel__format), 0, 0, 1, 1},
  {&__pyx_n_s_Channel__unlock, __pyx_k_Channel__unlock, sizeof(__pyx_k_Channel__unlock), 0, 0, 1, 1},
  {&__pyx_n_s_Channel_empty, __pyx_k_Channel_empty, sizeof(__pyx_k_Channel_empty), 0, 0, 1, 1},
  {&__pyx_n_s_Channel_full, __pyx_k_Channel_full, sizeof(__pyx_k_Channel_full), 0, 0, 1, 1},
  {&__pyx_n_s_Channel_get, __pyx_k_Channel_get, sizeof(__pyx_k_Channel_get), 0, 0, 1, 1},
  {&__pyx_n_s_Channel_get_nowait, __pyx_k_Channel_get_nowait, sizeof(__pyx_k_Channel_get_nowait), 0, 0, 1, 1},
  {&__pyx_n_s_Channel_put, __pyx_k_Channel_put, sizeof(__pyx_k_Channel_put), 0, 0, 1, 1},
  {&__pyx_n_s_Channel_put_nowait, __pyx_k_Channel_put_nowait, sizeof(__pyx_k_Channel_put_nowait), 0, 0, 1, 1},
  {&__pyx_n_s_Channel_qsize, __pyx_k_Channel_qsize, sizeof(__pyx_k_Channel_qsize), 0, 0, 1, 1},
  {&__pyx_kp_s_Channels_have_a_maxsize_of_1, __pyx_k_Channels_have_a_maxsize_of_1, sizeof(__pyx_k_Channels_have_a_maxsize_of_1), 0, 0, 1, 0},
  {&__pyx_n_s_DeprecationWarning, __pyx_k_DeprecationWarning, sizeof(__pyx_k_DeprecationWarning), 0, 0, 1, 1},
  {&__pyx_n_s_Empty, __pyx_k_Empty, sizeof(__pyx_k_Empty), 0, 0, 1, 1},
  {&__pyx_n_s_Empty_2, __pyx_k_Empty_2, sizeof(__pyx_k_Empty_2), 0, 0, 1, 1},
  {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1},
  {&__pyx_n_s_Full, __pyx_k_Full, sizeof(__pyx_k_Full), 0, 0, 1, 1},
  {&__pyx_n_s_Full_2, __pyx_k_Full_2, sizeof(__pyx_k_Full_2), 0, 0, 1, 1},
  {&__pyx_n_s_InvalidSwitchError, __pyx_k_InvalidSwitchError, sizeof(__pyx_k_InvalidSwitchError), 0, 0, 1, 1},
  {&__pyx_kp_s_Invalid_switch_into_Channel_put, __pyx_k_Invalid_switch_into_Channel_put, sizeof(__pyx_k_Invalid_switch_into_Channel_put), 0, 0, 1, 0},
  {&__pyx_kp_s_Invalid_switch_into_Queue_get_r, __pyx_k_Invalid_switch_into_Queue_get_r, sizeof(__pyx_k_Invalid_switch_into_Queue_get_r), 0, 0, 1, 0},
  {&__pyx_kp_s_Invalid_switch_into_Queue_put_r, __pyx_k_Invalid_switch_into_Queue_put_r, sizeof(__pyx_k_Invalid_switch_into_Queue_put_r), 0, 0, 1, 0},
  {&__pyx_n_s_ItemWaiter, __pyx_k_ItemWaiter, sizeof(__pyx_k_ItemWaiter), 0, 0, 1, 1},
  {&__pyx_n_s_ItemWaiter_put_and_switch, __pyx_k_ItemWaiter_put_and_switch, sizeof(__pyx_k_ItemWaiter_put_and_switch), 0, 0, 1, 1},
  {&__pyx_n_s_JoinableQueue, __pyx_k_JoinableQueue, sizeof(__pyx_k_JoinableQueue), 0, 0, 1, 1},
  {&__pyx_n_s_JoinableQueue__format, __pyx_k_JoinableQueue__format, sizeof(__pyx_k_JoinableQueue__format), 0, 0, 1, 1},
  {&__pyx_n_s_JoinableQueue__put, __pyx_k_JoinableQueue__put, sizeof(__pyx_k_JoinableQueue__put), 0, 0, 1, 1},
  {&__pyx_n_s_JoinableQueue_copy, __pyx_k_JoinableQueue_copy, sizeof(__pyx_k_JoinableQueue_copy), 0, 0, 1, 1},
  {&__pyx_n_s_JoinableQueue_join, __pyx_k_JoinableQueue_join, sizeof(__pyx_k_JoinableQueue_join), 0, 0, 1, 1},
  {&__pyx_n_s_JoinableQueue_task_done, __pyx_k_JoinableQueue_task_done, sizeof(__pyx_k_JoinableQueue_task_done), 0, 0, 1, 1},
  {&__pyx_n_s_LifoQueue, __pyx_k_LifoQueue, sizeof(__pyx_k_LifoQueue), 0, 0, 1, 1},
  {&__pyx_n_s_LifoQueue__create_queue, __pyx_k_LifoQueue__create_queue, sizeof(__pyx_k_LifoQueue__create_queue), 0, 0, 1, 1},
  {&__pyx_n_s_LifoQueue__get, __pyx_k_LifoQueue__get, sizeof(__pyx_k_LifoQueue__get), 0, 0, 1, 1},
  {&__pyx_n_s_LifoQueue__peek, __pyx_k_LifoQueue__peek, sizeof(__pyx_k_LifoQueue__peek), 0, 0, 1, 1},
  {&__pyx_n_s_LifoQueue__put, __pyx_k_LifoQueue__put, sizeof(__pyx_k_LifoQueue__put), 0, 0, 1, 1},
  {&__pyx_n_s_PriorityQueue, __pyx_k_PriorityQueue, sizeof(__pyx_k_PriorityQueue), 0, 0, 1, 1},
  {&__pyx_n_s_PriorityQueue__create_queue, __pyx_k_PriorityQueue__create_queue, sizeof(__pyx_k_PriorityQueue__create_queue), 0, 0, 1, 1},
  {&__pyx_n_s_PriorityQueue__get, __pyx_k_PriorityQueue__get, sizeof(__pyx_k_PriorityQueue__get), 0, 0, 1, 1},
  {&__pyx_n_s_PriorityQueue__put, __pyx_k_PriorityQueue__put, sizeof(__pyx_k_PriorityQueue__put), 0, 0, 1, 1},
  {&__pyx_n_s_PySimpleQueue, __pyx_k_PySimpleQueue, sizeof(__pyx_k_PySimpleQueue), 0, 0, 1, 1},
  {&__pyx_n_s_Queue, __pyx_k_Queue, sizeof(__pyx_k_Queue), 0, 0, 1, 1},
  {&__pyx_kp_s_Queue_0_now_equivalent_to_Queue, __pyx_k_Queue_0_now_equivalent_to_Queue, sizeof(__pyx_k_Queue_0_now_equivalent_to_Queue), 0, 0, 1, 0},
  {&__pyx_n_s_Queue__create_queue, __pyx_k_Queue__create_queue, sizeof(__pyx_k_Queue__create_queue), 0, 0, 1, 1},
  {&__pyx_n_s_Queue__format, __pyx_k_Queue__format, sizeof(__pyx_k_Queue__format), 0, 0, 1, 1},
  {&__pyx_n_s_Queue__get, __pyx_k_Queue__get, sizeof(__pyx_k_Queue__get), 0, 0, 1, 1},
  {&__pyx_n_s_Queue__peek, __pyx_k_Queue__peek, sizeof(__pyx_k_Queue__peek), 0, 0, 1, 1},
  {&__pyx_n_s_Queue__put, __pyx_k_Queue__put, sizeof(__pyx_k_Queue__put), 0, 0, 1, 1},
  {&__pyx_n_s_Queue__unlock, __pyx_k_Queue__unlock, sizeof(__pyx_k_Queue__unlock), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_copy, __pyx_k_Queue_copy, sizeof(__pyx_k_Queue_copy), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_empty, __pyx_k_Queue_empty, sizeof(__pyx_k_Queue_empty), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_full, __pyx_k_Queue_full, sizeof(__pyx_k_Queue_full), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_get, __pyx_k_Queue_get, sizeof(__pyx_k_Queue_get), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_get_nowait, __pyx_k_Queue_get_nowait, sizeof(__pyx_k_Queue_get_nowait), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_peek, __pyx_k_Queue_peek, sizeof(__pyx_k_Queue_peek), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_peek_nowait, __pyx_k_Queue_peek_nowait, sizeof(__pyx_k_Queue_peek_nowait), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_put, __pyx_k_Queue_put, sizeof(__pyx_k_Queue_put), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_put_nowait, __pyx_k_Queue_put_nowait, sizeof(__pyx_k_Queue_put_nowait), 0, 0, 1, 1},
  {&__pyx_n_s_Queue_qsize, __pyx_k_Queue_qsize, sizeof(__pyx_k_Queue_qsize), 0, 0, 1, 1},
  {&__pyx_n_s_SimpleQueue, __pyx_k_SimpleQueue, sizeof(__pyx_k_SimpleQueue), 0, 0, 1, 1},
  {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
  {&__pyx_n_s_Timeout, __pyx_k_Timeout, sizeof(__pyx_k_Timeout), 0, 0, 1, 1},
  {&__pyx_n_s_UnboundQueue, __pyx_k_UnboundQueue, sizeof(__pyx_k_UnboundQueue), 0, 0, 1, 1},
  {&__pyx_kp_s_UnboundQueue_has_no_maxsize, __pyx_k_UnboundQueue_has_no_maxsize, sizeof(__pyx_k_UnboundQueue_has_no_maxsize), 0, 0, 1, 0},
  {&__pyx_n_s_UnboundQueue_put, __pyx_k_UnboundQueue_put, sizeof(__pyx_k_UnboundQueue_put), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_Waiter, __pyx_k_Waiter, sizeof(__pyx_k_Waiter), 0, 0, 1, 1},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_block, __pyx_k_block, sizeof(__pyx_k_block), 0, 0, 1, 1},
  {&__pyx_n_s_cancel, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1},
  {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_cond, __pyx_k_cond, sizeof(__pyx_k_cond), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_create_queue, __pyx_k_create_queue, sizeof(__pyx_k_create_queue), 0, 0, 1, 1},
  {&__pyx_n_s_deque, __pyx_k_deque, sizeof(__pyx_k_deque), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
  {&__pyx_n_s_event_unlock, __pyx_k_event_unlock, sizeof(__pyx_k_event_unlock), 0, 0, 1, 1},
  {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
  {&__pyx_n_s_extensions, __pyx_k_extensions, sizeof(__pyx_k_extensions), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_full, __pyx_k_full, sizeof(__pyx_k_full), 0, 0, 1, 1},
  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
  {&__pyx_n_s_get_2, __pyx_k_get_2, sizeof(__pyx_k_get_2), 0, 0, 1, 1},
  {&__pyx_n_s_get_hub_noargs, __pyx_k_get_hub_noargs, sizeof(__pyx_k_get_hub_noargs), 0, 0, 1, 1},
  {&__pyx_n_s_get_nowait, __pyx_k_get_nowait, sizeof(__pyx_k_get_nowait), 0, 0, 1, 1},
  {&__pyx_n_s_getcurrent, __pyx_k_getcurrent, sizeof(__pyx_k_getcurrent), 0, 0, 1, 1},
  {&__pyx_n_s_getter, __pyx_k_getter, sizeof(__pyx_k_getter), 0, 0, 1, 1},
  {&__pyx_n_s_getters, __pyx_k_getters, sizeof(__pyx_k_getters), 0, 0, 1, 1},
  {&__pyx_kp_s_getters_s, __pyx_k_getters_s, sizeof(__pyx_k_getters_s), 0, 0, 1, 0},
  {&__pyx_kp_s_getters_s_2, __pyx_k_getters_s_2, sizeof(__pyx_k_getters_s_2), 0, 0, 1, 0},
  {&__pyx_n_s_gevent, __pyx_k_gevent, sizeof(__pyx_k_gevent), 0, 0, 1, 1},
  {&__pyx_n_s_gevent__gevent_cqueue, __pyx_k_gevent__gevent_cqueue, sizeof(__pyx_k_gevent__gevent_cqueue), 0, 0, 1, 1},
  {&__pyx_n_s_gevent__hub_local, __pyx_k_gevent__hub_local, sizeof(__pyx_k_gevent__hub_local), 0, 0, 1, 1},
  {&__pyx_kp_s_gevent__queue, __pyx_k_gevent__queue, sizeof(__pyx_k_gevent__queue), 0, 0, 1, 0},
  {&__pyx_n_s_gevent__util, __pyx_k_gevent__util, sizeof(__pyx_k_gevent__util), 0, 0, 1, 1},
  {&__pyx_n_s_gevent__waiter, __pyx_k_gevent__waiter, sizeof(__pyx_k_gevent__waiter), 0, 0, 1, 1},
  {&__pyx_n_s_gevent_event, __pyx_k_gevent_event, sizeof(__pyx_k_gevent_event), 0, 0, 1, 1},
  {&__pyx_n_s_gevent_exceptions, __pyx_k_gevent_exceptions, sizeof(__pyx_k_gevent_exceptions), 0, 0, 1, 1},
  {&__pyx_n_s_gevent_timeout, __pyx_k_gevent_timeout, sizeof(__pyx_k_gevent_timeout), 0, 0, 1, 1},
  {&__pyx_n_s_greenlet, __pyx_k_greenlet, sizeof(__pyx_k_greenlet), 0, 0, 1, 1},
  {&__pyx_n_s_greenlet_imported, __pyx_k_greenlet_imported, sizeof(__pyx_k_greenlet_imported), 0, 0, 1, 1},
  {&__pyx_n_s_greenlet_init, __pyx_k_greenlet_init, sizeof(__pyx_k_greenlet_init), 0, 0, 1, 1},
  {&__pyx_n_s_heapify, __pyx_k_heapify, sizeof(__pyx_k_heapify), 0, 0, 1, 1},
  {&__pyx_n_s_heapify_2, __pyx_k_heapify_2, sizeof(__pyx_k_heapify_2), 0, 0, 1, 1},
  {&__pyx_n_s_heappop, __pyx_k_heappop, sizeof(__pyx_k_heappop), 0, 0, 1, 1},
  {&__pyx_n_s_heappop_2, __pyx_k_heappop_2, sizeof(__pyx_k_heappop_2), 0, 0, 1, 1},
  {&__pyx_n_s_heappush, __pyx_k_heappush, sizeof(__pyx_k_heappush), 0, 0, 1, 1},
  {&__pyx_n_s_heappush_2, __pyx_k_heappush_2, sizeof(__pyx_k_heappush_2), 0, 0, 1, 1},
  {&__pyx_n_s_heapq, __pyx_k_heapq, sizeof(__pyx_k_heapq), 0, 0, 1, 1},
  {&__pyx_n_s_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 0, 0, 1, 1},
  {&__pyx_n_s_hub, __pyx_k_hub, sizeof(__pyx_k_hub), 0, 0, 1, 1},
  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
  {&__pyx_n_s_implements, __pyx_k_implements, sizeof(__pyx_k_implements), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_import_c_accel, __pyx_k_import_c_accel, sizeof(__pyx_k_import_c_accel), 0, 0, 1, 1},
  {&__pyx_n_s_imports, __pyx_k_imports, sizeof(__pyx_k_imports), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_init_2, __pyx_k_init_2, sizeof(__pyx_k_init_2), 0, 0, 1, 1},
  {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
  {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
  {&__pyx_n_s_lambda, __pyx_k_lambda, sizeof(__pyx_k_lambda), 0, 0, 1, 1},
  {&__pyx_n_s_loop, __pyx_k_loop, sizeof(__pyx_k_loop), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_maxsize, __pyx_k_maxsize, sizeof(__pyx_k_maxsize), 0, 0, 1, 1},
  {&__pyx_n_s_maxsize_2, __pyx_k_maxsize_2, sizeof(__pyx_k_maxsize_2), 0, 0, 1, 1},
  {&__pyx_kp_s_maxsize_r, __pyx_k_maxsize_r, sizeof(__pyx_k_maxsize_r), 0, 0, 1, 0},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
  {&__pyx_n_s_next_2, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1},
  {&__pyx_n_s_peek, __pyx_k_peek, sizeof(__pyx_k_peek), 0, 0, 1, 1},
  {&__pyx_n_s_peek_2, __pyx_k_peek_2, sizeof(__pyx_k_peek_2), 0, 0, 1, 1},
  {&__pyx_n_s_peek_nowait, __pyx_k_peek_nowait, sizeof(__pyx_k_peek_nowait), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_popleft, __pyx_k_popleft, sizeof(__pyx_k_popleft), 0, 0, 1, 1},
  {&__pyx_n_s_put, __pyx_k_put, sizeof(__pyx_k_put), 0, 0, 1, 1},
  {&__pyx_n_s_put_2, __pyx_k_put_2, sizeof(__pyx_k_put_2), 0, 0, 1, 1},
  {&__pyx_n_s_put_and_switch, __pyx_k_put_and_switch, sizeof(__pyx_k_put_and_switch), 0, 0, 1, 1},
  {&__pyx_n_s_put_nowait, __pyx_k_put_nowait, sizeof(__pyx_k_put_nowait), 0, 0, 1, 1},
  {&__pyx_n_s_putter, __pyx_k_putter, sizeof(__pyx_k_putter), 0, 0, 1, 1},
  {&__pyx_n_s_putters, __pyx_k_putters, sizeof(__pyx_k_putters), 0, 0, 1, 1},
  {&__pyx_kp_s_putters_s, __pyx_k_putters_s, sizeof(__pyx_k_putters_s), 0, 0, 1, 0},
  {&__pyx_kp_s_putters_s_2, __pyx_k_putters_s_2, sizeof(__pyx_k_putters_s_2), 0, 0, 1, 0},
  {&__pyx_n_s_pyx_capi, __pyx_k_pyx_capi, sizeof(__pyx_k_pyx_capi), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_qsize, __pyx_k_qsize, sizeof(__pyx_k_qsize), 0, 0, 1, 1},
  {&__pyx_n_s_queue, __pyx_k_queue, sizeof(__pyx_k_queue), 0, 0, 1, 1},
  {&__pyx_n_s_queue_2, __pyx_k_queue_2, sizeof(__pyx_k_queue_2), 0, 0, 1, 1},
  {&__pyx_kp_s_queue_r, __pyx_k_queue_r, sizeof(__pyx_k_queue_r), 0, 0, 1, 0},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_s_repeat, __pyx_k_repeat, sizeof(__pyx_k_repeat), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_run_callback, __pyx_k_run_callback, sizeof(__pyx_k_run_callback), 0, 0, 1, 1},
  {&__pyx_kp_s_s_at_s_s, __pyx_k_s_at_s_s, sizeof(__pyx_k_s_at_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_at_s_s_2, __pyx_k_s_at_s_s_2, sizeof(__pyx_k_s_at_s_s_2), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
  {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0},
  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
  {&__pyx_n_s_set, __pyx_k_set, sizeof(__pyx_k_set), 0, 0, 1, 1},
  {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1},
  {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
  {&__pyx_kp_s_src_gevent_queue_py, __pyx_k_src_gevent_queue_py, sizeof(__pyx_k_src_gevent_queue_py), 0, 0, 1, 0},
  {&__pyx_n_s_stacklevel, __pyx_k_stacklevel, sizeof(__pyx_k_stacklevel), 0, 0, 1, 1},
  {&__pyx_n_s_start_new_or_dummy, __pyx_k_start_new_or_dummy, sizeof(__pyx_k_start_new_or_dummy), 0, 0, 1, 1},
  {&__pyx_n_s_switch, __pyx_k_switch, sizeof(__pyx_k_switch), 0, 0, 1, 1},
  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
  {&__pyx_n_s_task_done, __pyx_k_task_done, sizeof(__pyx_k_task_done), 0, 0, 1, 1},
  {&__pyx_kp_s_task_done_called_too_many_times, __pyx_k_task_done_called_too_many_times, sizeof(__pyx_k_task_done_called_too_many_times), 0, 0, 1, 0},
  {&__pyx_kp_s_tasks_s__cond_s, __pyx_k_tasks_s__cond_s, sizeof(__pyx_k_tasks_s__cond_s), 0, 0, 1, 0},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_n_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 1},
  {&__pyx_n_s_unfinished_tasks, __pyx_k_unfinished_tasks, sizeof(__pyx_k_unfinished_tasks), 0, 0, 1, 1},
  {&__pyx_n_s_unlock, __pyx_k_unlock, sizeof(__pyx_k_unlock), 0, 0, 1, 1},
  {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
  {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1},
  {&__pyx_n_s_waiter, __pyx_k_waiter, sizeof(__pyx_k_waiter), 0, 0, 1, 1},
  {&__pyx_n_s_waiter_2, __pyx_k_waiter_2, sizeof(__pyx_k_waiter_2), 0, 0, 1, 1},
  {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1},
  {&__pyx_n_s_warn_depth, __pyx_k_warn_depth, sizeof(__pyx_k_warn_depth), 0, 0, 1, 1},
  {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1},
  {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1},
  #endif
  {0, 0, 0, 0, 0, 0, 0}
};
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(0, 76, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 71, __pyx_L1_error)
  __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(0, 134, __pyx_L1_error)
  __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 185, __pyx_L1_error)
  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 185, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 412, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "src/gevent/queue.py":132
 *             if maxsize == 0:
 *                 import warnings
 *                 warnings.warn(             # <<<<<<<<<<<<<<
 *                     'Queue(0) now equivalent to Queue(None); if you want a channel, use Channel',
 *                     DeprecationWarning,
 */
  __pyx_tuple__2 = PyTuple_Pack(2, __pyx_kp_s_Queue_0_now_equivalent_to_Queue, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "src/gevent/queue.py":427
 *     def __init__(self, maxsize=None, items=()):
 *         if maxsize is not None:
 *             raise ValueError("UnboundQueue has no maxsize")             # <<<<<<<<<<<<<<
 *         Queue.__init__(self, maxsize, items)
 *         self.putters = None # Will never be used.
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_UnboundQueue_has_no_maxsize); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "src/gevent/queue.py":541
 *         '''
 *         if self.unfinished_tasks <= 0:
 *             raise ValueError('task_done() called too many times')             # <<<<<<<<<<<<<<
 *         self.unfinished_tasks -= 1
 *         if self.unfinished_tasks == 0:
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_task_done_called_too_many_times); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "src/gevent/queue.py":579
 *         # We take maxsize to simplify certain kinds of code
 *         if maxsize != 1:
 *             raise ValueError("Channels have a maxsize of 1")             # <<<<<<<<<<<<<<
 *         self.getters = collections.deque()
 *         self.putters = collections.deque()
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Channels_have_a_maxsize_of_1); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 579, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "src/gevent/queue.py":74
 *         pass
 * 
 * import gevent._waiter             # <<<<<<<<<<<<<<
 * locals()['Waiter'] = gevent._waiter.Waiter
 * locals()['getcurrent'] = __import__('greenlet').getcurrent
 */
  __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_s_gevent, __pyx_n_s_waiter); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "src/gevent/queue.py":76
 * import gevent._waiter
 * locals()['Waiter'] = gevent._waiter.Waiter
 * locals()['getcurrent'] = __import__('greenlet').getcurrent             # <<<<<<<<<<<<<<
 * locals()['greenlet_init'] = lambda: None
 * 
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_n_s_greenlet); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "src/gevent/queue.py":82
 *     # pylint:disable=assigning-non-slot
 *     __slots__ = (
 *         'item',             # <<<<<<<<<<<<<<
 *         'queue',
 *     )
 */
  __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_item, __pyx_n_s_queue); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "src/gevent/queue.py":91
 *         self.queue = queue
 * 
 *     def put_and_switch(self):             # <<<<<<<<<<<<<<
 *         self.queue._put(self.item)
 *         self.queue = None
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 91, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);
  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_and_switch, 91, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 91, __pyx_L1_error)

  /* "src/gevent/queue.py":119
 * 
 *     __slots__ = (
 *         '_maxsize',             # <<<<<<<<<<<<<<
 *         'getters',
 *         'putters',
 */
  __pyx_tuple__13 = PyTuple_Pack(7, __pyx_n_s_maxsize_2, __pyx_n_s_getters, __pyx_n_s_putters, __pyx_n_s_hub, __pyx_n_s_event_unlock, __pyx_n_s_queue, __pyx_n_s_weakref); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "src/gevent/queue.py":169
 *             self._maxsize = nv
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return type(self)(self.maxsize, self.queue)
 * 
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);
  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_copy, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 169, __pyx_L1_error)

  /* "src/gevent/queue.py":172
 *         return type(self)(self.maxsize, self.queue)
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return collections.deque(items)
 * 
 */
  __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_items); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);
  __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_create_queue, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 172, __pyx_L1_error)

  /* "src/gevent/queue.py":175
 *         return collections.deque(items)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return self.queue.popleft()
 * 
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);
  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get, 175, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 175, __pyx_L1_error)

  /* "src/gevent/queue.py":178
 *         return self.queue.popleft()
 * 
 *     def _peek(self):             # <<<<<<<<<<<<<<
 *         return self.queue[0]
 * 
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_peek, 178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 178, __pyx_L1_error)

  /* "src/gevent/queue.py":181
 *         return self.queue[0]
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         self.queue.append(item)
 * 
 */
  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);
  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put, 181, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 181, __pyx_L1_error)

  /* "src/gevent/queue.py":190
 *         return '<%s%s>' % (type(self).__name__, self._format())
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = []
 *         if self.maxsize is not None:
 */
  __pyx_tuple__24 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);
  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_format, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 190, __pyx_L1_error)

  /* "src/gevent/queue.py":204
 *         return ''
 * 
 *     def qsize(self):             # <<<<<<<<<<<<<<
 *         """Return the size of the queue."""
 *         return len(self.queue)
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);
  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_qsize, 204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 204, __pyx_L1_error)

  /* "src/gevent/queue.py":236
 *         return True
 * 
 *     def empty(self):             # <<<<<<<<<<<<<<
 *         """Return ``True`` if the queue is empty, ``False`` otherwise."""
 *         return not self.qsize()
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);
  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_empty, 236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 236, __pyx_L1_error)

  /* "src/gevent/queue.py":240
 *         return not self.qsize()
 * 
 *     def full(self):             # <<<<<<<<<<<<<<
 *         """Return ``True`` if the queue is full, ``False`` otherwise.
 * 
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);
  __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_full, 240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 240, __pyx_L1_error)

  /* "src/gevent/queue.py":247
 *         return self._maxsize > 0 and self.qsize() >= self._maxsize
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Put an item into the queue.
 * 
 */
  __pyx_tuple__32 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_item, __pyx_n_s_block, __pyx_n_s_timeout); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);
  __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_2, 247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 247, __pyx_L1_error)

  /* "src/gevent/queue.py":289
 *             raise Full
 * 
 *     def put_nowait(self, item):             # <<<<<<<<<<<<<<
 *         """Put an item into the queue without blocking.
 * 
 */
  __pyx_tuple__34 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);
  __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_nowait, 289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 289, __pyx_L1_error)

  /* "src/gevent/queue.py":334
 *             _safe_remove(self.getters, waiter)
 * 
 *     def get(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Remove and return an item from the queue.
 * 
 */
  __pyx_tuple__36 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_block, __pyx_n_s_timeout); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);
  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get_2, 334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 334, __pyx_L1_error)

  /* "src/gevent/queue.py":351
 *         return self.__get_or_peek(self._get, block, timeout)
 * 
 *     def get_nowait(self):             # <<<<<<<<<<<<<<
 *         """Remove and return an item from the queue without blocking.
 * 
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);
  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get_nowait, 351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 351, __pyx_L1_error)

  /* "src/gevent/queue.py":359
 *         return self.get(False)
 * 
 *     def peek(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Return an item from the queue without removing it.
 * 
 */
  __pyx_tuple__40 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_block, __pyx_n_s_timeout); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);
  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_peek_2, 359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 359, __pyx_L1_error)

  /* "src/gevent/queue.py":376
 *         return self.__get_or_peek(self._peek, block, timeout)
 * 
 *     def peek_nowait(self):             # <<<<<<<<<<<<<<
 *         """Return an item from the queue without blocking.
 * 
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);
  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_peek_nowait, 376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 376, __pyx_L1_error)

  /* "src/gevent/queue.py":384
 *         return self.peek(False)
 * 
 *     def _unlock(self):             # <<<<<<<<<<<<<<
 *         while True:
 *             repeat = False
 */
  __pyx_tuple__44 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_repeat, __pyx_n_s_putter, __pyx_n_s_getter); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);
  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_unlock, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 384, __pyx_L1_error)

  /* "src/gevent/queue.py":431
 *         self.putters = None # Will never be used.
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         self._put(item)
 *         if self.getters:
 */
  __pyx_tuple__46 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_item, __pyx_n_s_block, __pyx_n_s_timeout); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);
  __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_2, 431, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 431, __pyx_L1_error)

  /* "src/gevent/queue.py":450
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         q = list(items)
 *         _heapify(q)
 */
  __pyx_tuple__48 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_items); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);
  __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_create_queue, 450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 450, __pyx_L1_error)

  /* "src/gevent/queue.py":455
 *         return q
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         _heappush(self.queue, item)
 * 
 */
  __pyx_tuple__50 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);
  __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put, 455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 455, __pyx_L1_error)

  /* "src/gevent/queue.py":458
 *         _heappush(self.queue, item)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return _heappop(self.queue)
 * 
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);
  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get, 458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 458, __pyx_L1_error)

  /* "src/gevent/queue.py":467
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return list(items)
 * 
 */
  __pyx_tuple__54 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_items); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);
  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_create_queue, 467, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 467, __pyx_L1_error)

  /* "src/gevent/queue.py":470
 *         return list(items)
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         self.queue.append(item)
 * 
 */
  __pyx_tuple__56 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 470, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);
  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put, 470, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 470, __pyx_L1_error)

  /* "src/gevent/queue.py":473
 *         self.queue.append(item)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return self.queue.pop()
 * 
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get, 473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 473, __pyx_L1_error)

  /* "src/gevent/queue.py":476
 *         return self.queue.pop()
 * 
 *     def _peek(self):             # <<<<<<<<<<<<<<
 *         return self.queue[-1]
 * 
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_peek, 476, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 476, __pyx_L1_error)

  /* "src/gevent/queue.py":487
 * 
 *     __slots__ = (
 *         '_cond',             # <<<<<<<<<<<<<<
 *         'unfinished_tasks',
 *     )
 */
  __pyx_tuple__62 = PyTuple_Pack(2, __pyx_n_s_cond, __pyx_n_s_unfinished_tasks); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "src/gevent/queue.py":515
 *             self._cond.clear()
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)
 * 
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);
  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_copy, 515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 515, __pyx_L1_error)

  /* "src/gevent/queue.py":518
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = Queue._format(self)
 *         if self.unfinished_tasks:
 */
  __pyx_tuple__65 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);
  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_format, 518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 518, __pyx_L1_error)

  /* "src/gevent/queue.py":524
 *         return result
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         Queue._put(self, item)
 *         self.unfinished_tasks += 1
 */
  __pyx_tuple__67 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);
  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put, 524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 524, __pyx_L1_error)

  /* "src/gevent/queue.py":529
 *         self._cond.clear()
 * 
 *     def task_done(self):             # <<<<<<<<<<<<<<
 *         '''Indicate that a formerly enqueued task is complete. Used by queue consumer threads.
 *         For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_task_done, 529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 529, __pyx_L1_error)

  /* "src/gevent/queue.py":546
 *             self._cond.set()
 * 
 *     def join(self, timeout=None):             # <<<<<<<<<<<<<<
 *         '''
 *         Block until all items in the queue have been gotten and processed.
 */
  __pyx_tuple__71 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_timeout); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);
  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_join, 546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 546, __pyx_L1_error)

  /* "src/gevent/queue.py":569
 * 
 *     __slots__ = (
 *         'getters',             # <<<<<<<<<<<<<<
 *         'putters',
 *         'hub',
 */
  __pyx_tuple__73 = PyTuple_Pack(5, __pyx_n_s_getters, __pyx_n_s_putters, __pyx_n_s_hub, __pyx_n_s_event_unlock, __pyx_n_s_weakref); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "src/gevent/queue.py":591
 *         return '<%s %s>' % (type(self).__name__, self._format())
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = ''
 *         if self.getters:
 */
  __pyx_tuple__74 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);
  __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_format, 591, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 591, __pyx_L1_error)

  /* "src/gevent/queue.py":603
 *         return len(self.putters) - len(self.getters)
 * 
 *     def qsize(self):             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);
  __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_qsize, 603, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 603, __pyx_L1_error)

  /* "src/gevent/queue.py":606
 *         return 0
 * 
 *     def empty(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);
  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_empty, 606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 606, __pyx_L1_error)

  /* "src/gevent/queue.py":609
 *         return True
 * 
 *     def full(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);
  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_full, 609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 609, __pyx_L1_error)

  /* "src/gevent/queue.py":612
 *         return True
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.getters:
 */
  __pyx_tuple__82 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_item, __pyx_n_s_block, __pyx_n_s_timeout, __pyx_n_s_getter, __pyx_n_s_waiter_2, __pyx_n_s_result); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);
  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_2, 612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 612, __pyx_L1_error)

  /* "src/gevent/queue.py":639
 *             timeout.cancel()
 * 
 *     def put_nowait(self, item):             # <<<<<<<<<<<<<<
 *         self.put(item, False)
 * 
 */
  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_nowait, 639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 639, __pyx_L1_error)

  /* "src/gevent/queue.py":642
 *         self.put(item, False)
 * 
 *     def get(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.putters:
 */
  __pyx_tuple__86 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_block, __pyx_n_s_timeout); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get_2, 642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 642, __pyx_L1_error)

  /* "src/gevent/queue.py":665
 *             timeout.close()
 * 
 *     def get_nowait(self):             # <<<<<<<<<<<<<<
 *         return self.get(False)
 * 
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get_nowait, 665, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 665, __pyx_L1_error)

  /* "src/gevent/queue.py":668
 *         return self.get(False)
 * 
 *     def _unlock(self):             # <<<<<<<<<<<<<<
 *         while self.putters and self.getters:
 *             getter = self.getters.popleft()
 */
  __pyx_tuple__90 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_getter, __pyx_n_s_item, __pyx_n_s_putter); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_unlock, 668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 668, __pyx_L1_error)

  /* "src/gevent/queue.py":690
 *     next = __next__ # Py2
 * 
 * def _init():             # <<<<<<<<<<<<<<
 *     greenlet_init() # pylint:disable=undefined-variable
 * 
 */
  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_init_2, 690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type;
  __pyx_umethod_PyList_Type_pop.method_name = &__pyx_n_s_pop;
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_InitString(__pyx_string_tab[0], &__pyx_n_s_) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[1], &__pyx_n_s_Channel) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[2], &__pyx_n_s_Channel__format) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[3], &__pyx_n_s_Channel__unlock) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[4], &__pyx_n_s_Channel_empty) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[5], &__pyx_n_s_Channel_full) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[6], &__pyx_n_s_Channel_get) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[7], &__pyx_n_s_Channel_get_nowait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[8], &__pyx_n_s_Channel_put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[9], &__pyx_n_s_Channel_put_nowait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[10], &__pyx_n_s_Channel_qsize) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[11], &__pyx_kp_s_Channels_have_a_maxsize_of_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[12], &__pyx_n_s_DeprecationWarning) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[13], &__pyx_n_s_Empty) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[14], &__pyx_n_s_Empty_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[15], &__pyx_n_s_Event) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[16], &__pyx_n_s_Full) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[17], &__pyx_n_s_Full_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[18], &__pyx_n_s_InvalidSwitchError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[19], &__pyx_kp_s_Invalid_switch_into_Channel_put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[20], &__pyx_kp_s_Invalid_switch_into_Queue_get_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[21], &__pyx_kp_s_Invalid_switch_into_Queue_put_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[22], &__pyx_n_s_ItemWaiter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[23], &__pyx_n_s_ItemWaiter_put_and_switch) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[24], &__pyx_n_s_JoinableQueue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[25], &__pyx_n_s_JoinableQueue__format) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[26], &__pyx_n_s_JoinableQueue__put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[27], &__pyx_n_s_JoinableQueue_copy) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[28], &__pyx_n_s_JoinableQueue_join) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[29], &__pyx_n_s_JoinableQueue_task_done) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[30], &__pyx_n_s_LifoQueue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[31], &__pyx_n_s_LifoQueue__create_queue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[32], &__pyx_n_s_LifoQueue__get) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[33], &__pyx_n_s_LifoQueue__peek) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[34], &__pyx_n_s_LifoQueue__put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[35], &__pyx_n_s_PriorityQueue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[36], &__pyx_n_s_PriorityQueue__create_queue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[37], &__pyx_n_s_PriorityQueue__get) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[38], &__pyx_n_s_PriorityQueue__put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[39], &__pyx_n_s_PySimpleQueue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[40], &__pyx_n_s_Queue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[41], &__pyx_kp_s_Queue_0_now_equivalent_to_Queue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[42], &__pyx_n_s_Queue__create_queue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[43], &__pyx_n_s_Queue__format) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[44], &__pyx_n_s_Queue__get) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[45], &__pyx_n_s_Queue__peek) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[46], &__pyx_n_s_Queue__put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[47], &__pyx_n_s_Queue__unlock) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[48], &__pyx_n_s_Queue_copy) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[49], &__pyx_n_s_Queue_empty) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[50], &__pyx_n_s_Queue_full) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[51], &__pyx_n_s_Queue_get) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[52], &__pyx_n_s_Queue_get_nowait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[53], &__pyx_n_s_Queue_peek) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[54], &__pyx_n_s_Queue_peek_nowait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[55], &__pyx_n_s_Queue_put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[56], &__pyx_n_s_Queue_put_nowait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[57], &__pyx_n_s_Queue_qsize) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[58], &__pyx_n_s_SimpleQueue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[59], &__pyx_n_s_StopIteration) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[60], &__pyx_n_s_Timeout) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[61], &__pyx_n_s_UnboundQueue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[62], &__pyx_kp_s_UnboundQueue_has_no_maxsize) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[63], &__pyx_n_s_UnboundQueue_put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[64], &__pyx_n_s_ValueError) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[65], &__pyx_n_s_Waiter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[66], &__pyx_kp_s__3) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[67], &__pyx_kp_s__4) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[68], &__pyx_n_s_all) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[69], &__pyx_n_s_append) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[70], &__pyx_n_s_block) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[71], &__pyx_n_s_cancel) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[72], &__pyx_n_s_clear) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[73], &__pyx_n_s_cline_in_traceback) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[74], &__pyx_n_s_close) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[75], &__pyx_n_s_collections) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[76], &__pyx_n_s_cond) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[77], &__pyx_n_s_copy) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[78], &__pyx_n_s_create_queue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[79], &__pyx_n_s_deque) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[80], &__pyx_n_s_dict) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[81], &__pyx_n_s_empty) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[82], &__pyx_n_s_event_unlock) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[83], &__pyx_n_s_exc_info) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[84], &__pyx_n_s_extensions) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[85], &__pyx_n_s_format) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[86], &__pyx_n_s_full) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[87], &__pyx_n_s_get) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[88], &__pyx_n_s_get_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[89], &__pyx_n_s_get_hub_noargs) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[90], &__pyx_n_s_get_nowait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[91], &__pyx_n_s_getcurrent) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[92], &__pyx_n_s_getter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[93], &__pyx_n_s_getters) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[94], &__pyx_kp_s_getters_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[95], &__pyx_kp_s_getters_s_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[96], &__pyx_n_s_gevent) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[97], &__pyx_n_s_gevent__gevent_cqueue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[98], &__pyx_n_s_gevent__hub_local) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[99], &__pyx_kp_s_gevent__queue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[100], &__pyx_n_s_gevent__util) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[101], &__pyx_n_s_gevent__waiter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[102], &__pyx_n_s_gevent_event) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[103], &__pyx_n_s_gevent_exceptions) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[104], &__pyx_n_s_gevent_timeout) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[105], &__pyx_n_s_greenlet) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[106], &__pyx_n_s_greenlet_imported) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[107], &__pyx_n_s_greenlet_init) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[108], &__pyx_n_s_heapify) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[109], &__pyx_n_s_heapify_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[110], &__pyx_n_s_heappop) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[111], &__pyx_n_s_heappop_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[112], &__pyx_n_s_heappush) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[113], &__pyx_n_s_heappush_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[114], &__pyx_n_s_heapq) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[115], &__pyx_n_s_hex) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[116], &__pyx_n_s_hub) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[117], &__pyx_n_s_id) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[118], &__pyx_n_s_implements) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[119], &__pyx_n_s_import) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[120], &__pyx_n_s_import_c_accel) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[121], &__pyx_n_s_imports) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[122], &__pyx_n_s_init) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[123], &__pyx_n_s_init_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[124], &__pyx_n_s_initializing) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[125], &__pyx_n_s_item) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[126], &__pyx_n_s_items) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[127], &__pyx_n_s_join) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[128], &__pyx_n_s_lambda) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[129], &__pyx_n_s_loop) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[130], &__pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[131], &__pyx_n_s_maxsize) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[132], &__pyx_n_s_maxsize_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[133], &__pyx_kp_s_maxsize_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[134], &__pyx_n_s_name) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[135], &__pyx_n_s_next) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[136], &__pyx_n_s_next_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[137], &__pyx_n_s_peek) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[138], &__pyx_n_s_peek_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[139], &__pyx_n_s_peek_nowait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[140], &__pyx_n_s_pop) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[141], &__pyx_n_s_popleft) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[142], &__pyx_n_s_put) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[143], &__pyx_n_s_put_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[144], &__pyx_n_s_put_and_switch) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[145], &__pyx_n_s_put_nowait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[146], &__pyx_n_s_putter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[147], &__pyx_n_s_putters) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[148], &__pyx_kp_s_putters_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[149], &__pyx_kp_s_putters_s_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[150], &__pyx_n_s_pyx_capi) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[151], &__pyx_n_s_pyx_vtable) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[152], &__pyx_n_s_qsize) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[153], &__pyx_n_s_queue) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[154], &__pyx_n_s_queue_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[155], &__pyx_kp_s_queue_r) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[156], &__pyx_n_s_remove) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[157], &__pyx_n_s_repeat) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[158], &__pyx_n_s_result) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[159], &__pyx_n_s_run_callback) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[160], &__pyx_kp_s_s_at_s_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[161], &__pyx_kp_s_s_at_s_s_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[162], &__pyx_kp_s_s_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[163], &__pyx_kp_s_s_s_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[164], &__pyx_n_s_self) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[165], &__pyx_n_s_set) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[166], &__pyx_n_s_slots) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[167], &__pyx_n_s_spec) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[168], &__pyx_kp_s_src_gevent_queue_py) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[169], &__pyx_n_s_stacklevel) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[170], &__pyx_n_s_start_new_or_dummy) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[171], &__pyx_n_s_switch) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[172], &__pyx_n_s_sys) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[173], &__pyx_n_s_task_done) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[174], &__pyx_kp_s_task_done_called_too_many_times) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[175], &__pyx_kp_s_tasks_s__cond_s) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[176], &__pyx_n_s_test) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[177], &__pyx_n_s_throw) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[178], &__pyx_n_s_timeout) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[179], &__pyx_n_s_unfinished_tasks) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[180], &__pyx_n_s_unlock) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[181], &__pyx_n_s_version_info) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[182], &__pyx_n_s_wait) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[183], &__pyx_n_s_waiter) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[184], &__pyx_n_s_waiter_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[185], &__pyx_n_s_warn) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[186], &__pyx_n_s_warn_depth) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[187], &__pyx_n_s_warnings) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  if (__Pyx_InitString(__pyx_string_tab[188], &__pyx_n_s_weakref) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  #endif
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_6gevent_14_gevent_cqueue__heappush = Py_None; Py_INCREF(Py_None);
  __pyx_v_6gevent_14_gevent_cqueue__heappop = Py_None; Py_INCREF(Py_None);
  __pyx_v_6gevent_14_gevent_cqueue__heapify = Py_None; Py_INCREF(Py_None);
  __pyx_v_6gevent_14_gevent_cqueue__Empty = Py_None; Py_INCREF(Py_None);
  __pyx_v_6gevent_14_gevent_cqueue__Full = Py_None; Py_INCREF(Py_None);
  __pyx_v_6gevent_14_gevent_cqueue_Timeout = Py_None; Py_INCREF(Py_None);
  __pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError = Py_None; Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  if (__Pyx_ExportVoidPtr(__pyx_n_s_greenlet_imported, (void *)&__pyx_v_6gevent_14_gevent_cqueue__greenlet_imported, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_heappush, (void *)&__pyx_v_6gevent_14_gevent_cqueue__heappush, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_heappop, (void *)&__pyx_v_6gevent_14_gevent_cqueue__heappop, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_heapify, (void *)&__pyx_v_6gevent_14_gevent_cqueue__heapify, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_Empty_2, (void *)&__pyx_v_6gevent_14_gevent_cqueue__Empty, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_Full_2, (void *)&__pyx_v_6gevent_14_gevent_cqueue__Full, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_Timeout, (void *)&__pyx_v_6gevent_14_gevent_cqueue_Timeout, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportVoidPtr(__pyx_n_s_InvalidSwitchError, (void *)&__pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("_safe_remove", (void (*)(void))__pyx_f_6gevent_14_gevent_cqueue__safe_remove, "PyObject *(PyObject *, PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_t_1 = PyImport_ImportModule("greenlet"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6gevent_14_gevent_cqueue_greenlet = __Pyx_ImportType(__pyx_t_1, "greenlet", "greenlet", sizeof(PyGreenlet), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_14_gevent_cqueue_greenlet) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_vtabptr_6gevent_14_gevent_cqueue_Queue = &__pyx_vtable_6gevent_14_gevent_cqueue_Queue;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue._get = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue__get;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue._put = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue__put;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue._peek = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue__peek;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.qsize = (Py_ssize_t (*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue_qsize;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.empty = (int (*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue_empty;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.full = (int (*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue_full;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue._create_queue = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue *__pyx_optional_args))__pyx_f_6gevent_14_gevent_cqueue_5Queue__create_queue;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.put = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put *__pyx_optional_args))__pyx_f_6gevent_14_gevent_cqueue_5Queue_put;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.put_nowait = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue_put_nowait;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue._Queue__get_or_peek = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, PyObject *, PyObject *))__pyx_f_6gevent_14_gevent_cqueue_5Queue__Queue__get_or_peek;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.get = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_get *__pyx_optional_args))__pyx_f_6gevent_14_gevent_cqueue_5Queue_get;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.get_nowait = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue_get_nowait;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.peek = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_peek *__pyx_optional_args))__pyx_f_6gevent_14_gevent_cqueue_5Queue_peek;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue.peek_nowait = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_5Queue_peek_nowait;
  __pyx_vtable_6gevent_14_gevent_cqueue_Queue._schedule_unlock = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *))__pyx_f_6gevent_14_gevent_cqueue_5Queue__schedule_unlock;
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_type_6gevent_14_gevent_cqueue_Queue = PyType_FromSpec(&__pyx_type_6gevent_14_gevent_cqueue_Queue_spec); if (unlikely(!__pyx_type_6gevent_14_gevent_cqueue_Queue)) __PYX_ERR(0, 97, __pyx_L1_error)
  #else
  if (PyType_Ready(&__pyx_type_6gevent_14_gevent_cqueue_Queue) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3
  __pyx_type_6gevent_14_gevent_cqueue_Queue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6gevent_14_gevent_cqueue_Queue.tp_dictoffset && __pyx_type_6gevent_14_gevent_cqueue_Queue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6gevent_14_gevent_cqueue_Queue.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_Queue, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 97, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6gevent_14_gevent_cqueue_5Queue_20__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6gevent_14_gevent_cqueue_5Queue_20__len__.doc = __pyx_doc_6gevent_14_gevent_cqueue_5Queue_20__len__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6gevent_14_gevent_cqueue_5Queue_20__len__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_Queue, __pyx_vtabptr_6gevent_14_gevent_cqueue_Queue) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #else
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_Queue.tp_dict, __pyx_vtabptr_6gevent_14_gevent_cqueue_Queue) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Queue, __pyx_type_6gevent_14_gevent_cqueue_Queue) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #else
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Queue, (PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_Queue) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
  #endif
  if (__pyx_type_6gevent_14_gevent_cqueue_Queue.tp_weaklistoffset == 0) __pyx_type_6gevent_14_gevent_cqueue_Queue.tp_weaklistoffset = offsetof(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue, __weakref__);
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6gevent_14_gevent_cqueue_Queue = (PyTypeObject *)__pyx_type_6gevent_14_gevent_cqueue_Queue;
  #else
  __pyx_ptype_6gevent_14_gevent_cqueue_Queue = &__pyx_type_6gevent_14_gevent_cqueue_Queue;
  #endif
  __pyx_t_3 = PyImport_ImportModule("gevent._gevent_c_waiter"); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_ptype_6gevent_16_gevent_c_waiter_Waiter = __Pyx_ImportType(__pyx_t_3, "gevent._gevent_c_waiter", "Waiter", sizeof(struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_vtabptr_6gevent_16_gevent_c_waiter_Waiter = (struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_Waiter*)__Pyx_GetVtable(__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter); if (unlikely(!__pyx_vtabptr_6gevent_16_gevent_c_waiter_Waiter)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_vtabptr_6gevent_14_gevent_cqueue_ItemWaiter = &__pyx_vtable_6gevent_14_gevent_cqueue_ItemWaiter;
  __pyx_vtable_6gevent_14_gevent_cqueue_ItemWaiter.__pyx_base = *__pyx_vtabptr_6gevent_16_gevent_c_waiter_Waiter;
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_4 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter = PyType_FromSpecWithBases(&__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter_spec, __pyx_t_4); if (unlikely(!__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  #else
  __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter.tp_base = __pyx_ptype_6gevent_16_gevent_c_waiter_Waiter;
  if (PyType_Ready(&__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3
  __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter.tp_dictoffset && __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter, __pyx_vtabptr_6gevent_14_gevent_cqueue_ItemWaiter) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #else
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter.tp_dict, __pyx_vtabptr_6gevent_14_gevent_cqueue_ItemWaiter) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ItemWaiter, __pyx_type_6gevent_14_gevent_cqueue_ItemWaiter) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #else
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ItemWaiter, (PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter = (PyTypeObject *)__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter;
  #else
  __pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter = &__pyx_type_6gevent_14_gevent_cqueue_ItemWaiter;
  #endif
  __pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue = &__pyx_vtable_6gevent_14_gevent_cqueue_UnboundQueue;
  __pyx_vtable_6gevent_14_gevent_cqueue_UnboundQueue.__pyx_base = *__pyx_vtabptr_6gevent_14_gevent_cqueue_Queue;
  __pyx_vtable_6gevent_14_gevent_cqueue_UnboundQueue.__pyx_base.put = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put *__pyx_optional_args))__pyx_f_6gevent_14_gevent_cqueue_12UnboundQueue_put;
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_4 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue = PyType_FromSpecWithBases(&__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue_spec, __pyx_t_4); if (unlikely(!__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  #else
  __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue.tp_base = __pyx_ptype_6gevent_14_gevent_cqueue_Queue;
  if (PyType_Ready(&__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3
  __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue.tp_dictoffset && __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue, __pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  #else
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue.tp_dict, __pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UnboundQueue, __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  #else
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_UnboundQueue, (PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
  #endif
  if (__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue.tp_weaklistoffset == 0) __pyx_type_6gevent_14_gevent_cqueue_UnboundQueue.tp_weaklistoffset = offsetof(struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue, __pyx_base.__weakref__);
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue = (PyTypeObject *)__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue;
  #else
  __pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue = &__pyx_type_6gevent_14_gevent_cqueue_UnboundQueue;
  #endif
  __pyx_vtabptr_6gevent_14_gevent_cqueue_PriorityQueue = &__pyx_vtable_6gevent_14_gevent_cqueue_PriorityQueue;
  __pyx_vtable_6gevent_14_gevent_cqueue_PriorityQueue.__pyx_base = *__pyx_vtabptr_6gevent_14_gevent_cqueue_Queue;
  __pyx_vtable_6gevent_14_gevent_cqueue_PriorityQueue.__pyx_base._get = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__get;
  __pyx_vtable_6gevent_14_gevent_cqueue_PriorityQueue.__pyx_base._put = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__put;
  __pyx_vtable_6gevent_14_gevent_cqueue_PriorityQueue.__pyx_base._create_queue = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue *__pyx_optional_args))__pyx_f_6gevent_14_gevent_cqueue_13PriorityQueue__create_queue;
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_4 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue = PyType_FromSpecWithBases(&__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue_spec, __pyx_t_4); if (unlikely(!__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  #else
  __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue.tp_base = __pyx_ptype_6gevent_14_gevent_cqueue_Queue;
  if (PyType_Ready(&__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3
  __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue.tp_dictoffset && __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue, __pyx_vtabptr_6gevent_14_gevent_cqueue_PriorityQueue) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  #else
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue.tp_dict, __pyx_vtabptr_6gevent_14_gevent_cqueue_PriorityQueue) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PriorityQueue, __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  #else
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PriorityQueue, (PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
  #endif
  if (__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue.tp_weaklistoffset == 0) __pyx_type_6gevent_14_gevent_cqueue_PriorityQueue.tp_weaklistoffset = offsetof(struct __pyx_obj_6gevent_14_gevent_cqueue_PriorityQueue, __pyx_base.__weakref__);
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue = (PyTypeObject *)__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue;
  #else
  __pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue = &__pyx_type_6gevent_14_gevent_cqueue_PriorityQueue;
  #endif
  __pyx_vtabptr_6gevent_14_gevent_cqueue_LifoQueue = &__pyx_vtable_6gevent_14_gevent_cqueue_LifoQueue;
  __pyx_vtable_6gevent_14_gevent_cqueue_LifoQueue.__pyx_base = *__pyx_vtabptr_6gevent_14_gevent_cqueue_Queue;
  __pyx_vtable_6gevent_14_gevent_cqueue_LifoQueue.__pyx_base._get = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__get;
  __pyx_vtable_6gevent_14_gevent_cqueue_LifoQueue.__pyx_base._put = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__put;
  __pyx_vtable_6gevent_14_gevent_cqueue_LifoQueue.__pyx_base._peek = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__peek;
  __pyx_vtable_6gevent_14_gevent_cqueue_LifoQueue.__pyx_base._create_queue = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue__create_queue *__pyx_optional_args))__pyx_f_6gevent_14_gevent_cqueue_9LifoQueue__create_queue;
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_4 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_type_6gevent_14_gevent_cqueue_LifoQueue = PyType_FromSpecWithBases(&__pyx_type_6gevent_14_gevent_cqueue_LifoQueue_spec, __pyx_t_4); if (unlikely(!__pyx_type_6gevent_14_gevent_cqueue_LifoQueue)) __PYX_ERR(0, 462, __pyx_L1_error)
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  #else
  __pyx_type_6gevent_14_gevent_cqueue_LifoQueue.tp_base = __pyx_ptype_6gevent_14_gevent_cqueue_Queue;
  if (PyType_Ready(&__pyx_type_6gevent_14_gevent_cqueue_LifoQueue) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3
  __pyx_type_6gevent_14_gevent_cqueue_LifoQueue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6gevent_14_gevent_cqueue_LifoQueue.tp_dictoffset && __pyx_type_6gevent_14_gevent_cqueue_LifoQueue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6gevent_14_gevent_cqueue_LifoQueue.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_LifoQueue, __pyx_vtabptr_6gevent_14_gevent_cqueue_LifoQueue) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
  #else
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_LifoQueue.tp_dict, __pyx_vtabptr_6gevent_14_gevent_cqueue_LifoQueue) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LifoQueue, __pyx_type_6gevent_14_gevent_cqueue_LifoQueue) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
  #else
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_LifoQueue, (PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_LifoQueue) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
  #endif
  if (__pyx_type_6gevent_14_gevent_cqueue_LifoQueue.tp_weaklistoffset == 0) __pyx_type_6gevent_14_gevent_cqueue_LifoQueue.tp_weaklistoffset = offsetof(struct __pyx_obj_6gevent_14_gevent_cqueue_LifoQueue, __pyx_base.__weakref__);
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue = (PyTypeObject *)__pyx_type_6gevent_14_gevent_cqueue_LifoQueue;
  #else
  __pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue = &__pyx_type_6gevent_14_gevent_cqueue_LifoQueue;
  #endif
  __pyx_vtabptr_6gevent_14_gevent_cqueue_JoinableQueue = &__pyx_vtable_6gevent_14_gevent_cqueue_JoinableQueue;
  __pyx_vtable_6gevent_14_gevent_cqueue_JoinableQueue.__pyx_base = *__pyx_vtabptr_6gevent_14_gevent_cqueue_Queue;
  __pyx_vtable_6gevent_14_gevent_cqueue_JoinableQueue.__pyx_base._put = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *, PyObject *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_13JoinableQueue__put;
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_t_4 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue = PyType_FromSpecWithBases(&__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue_spec, __pyx_t_4); if (unlikely(!__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  #else
  __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue.tp_base = __pyx_ptype_6gevent_14_gevent_cqueue_Queue;
  if (PyType_Ready(&__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3
  __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue.tp_dictoffset && __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON
  {
    PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 480, __pyx_L1_error)
    if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
      __pyx_wrapperbase_6gevent_14_gevent_cqueue_13JoinableQueue___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
      __pyx_wrapperbase_6gevent_14_gevent_cqueue_13JoinableQueue___init__.doc = __pyx_doc_6gevent_14_gevent_cqueue_13JoinableQueue___init__;
      ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_6gevent_14_gevent_cqueue_13JoinableQueue___init__;
    }
  }
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue, __pyx_vtabptr_6gevent_14_gevent_cqueue_JoinableQueue) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
  #else
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue.tp_dict, __pyx_vtabptr_6gevent_14_gevent_cqueue_JoinableQueue) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_JoinableQueue, __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
  #else
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_JoinableQueue, (PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
  #endif
  if (__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue.tp_weaklistoffset == 0) __pyx_type_6gevent_14_gevent_cqueue_JoinableQueue.tp_weaklistoffset = offsetof(struct __pyx_obj_6gevent_14_gevent_cqueue_JoinableQueue, __pyx_base.__weakref__);
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue = (PyTypeObject *)__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue;
  #else
  __pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue = &__pyx_type_6gevent_14_gevent_cqueue_JoinableQueue;
  #endif
  __pyx_vtabptr_6gevent_14_gevent_cqueue_Channel = &__pyx_vtable_6gevent_14_gevent_cqueue_Channel;
  __pyx_vtable_6gevent_14_gevent_cqueue_Channel.get = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_14_gevent_cqueue_7Channel_get *__pyx_optional_args))__pyx_f_6gevent_14_gevent_cqueue_7Channel_get;
  __pyx_vtable_6gevent_14_gevent_cqueue_Channel.get_nowait = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *, int __pyx_skip_dispatch))__pyx_f_6gevent_14_gevent_cqueue_7Channel_get_nowait;
  __pyx_vtable_6gevent_14_gevent_cqueue_Channel._schedule_unlock = (PyObject *(*)(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel *))__pyx_f_6gevent_14_gevent_cqueue_7Channel__schedule_unlock;
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_type_6gevent_14_gevent_cqueue_Channel = PyType_FromSpec(&__pyx_type_6gevent_14_gevent_cqueue_Channel_spec); if (unlikely(!__pyx_type_6gevent_14_gevent_cqueue_Channel)) __PYX_ERR(0, 566, __pyx_L1_error)
  #else
  if (PyType_Ready(&__pyx_type_6gevent_14_gevent_cqueue_Channel) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3
  __pyx_type_6gevent_14_gevent_cqueue_Channel.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6gevent_14_gevent_cqueue_Channel.tp_dictoffset && __pyx_type_6gevent_14_gevent_cqueue_Channel.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_6gevent_14_gevent_cqueue_Channel.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_Channel, __pyx_vtabptr_6gevent_14_gevent_cqueue_Channel) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
  #else
  if (__Pyx_SetVtable(__pyx_type_6gevent_14_gevent_cqueue_Channel.tp_dict, __pyx_vtabptr_6gevent_14_gevent_cqueue_Channel) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_LIMITED_API
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Channel, __pyx_type_6gevent_14_gevent_cqueue_Channel) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
  #else
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Channel, (PyObject *)&__pyx_type_6gevent_14_gevent_cqueue_Channel) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
  #endif
  if (__pyx_type_6gevent_14_gevent_cqueue_Channel.tp_weaklistoffset == 0) __pyx_type_6gevent_14_gevent_cqueue_Channel.tp_weaklistoffset = offsetof(struct __pyx_obj_6gevent_14_gevent_cqueue_Channel, __weakref__);
  #if CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6gevent_14_gevent_cqueue_Channel = (PyTypeObject *)__pyx_type_6gevent_14_gevent_cqueue_Channel;
  #else
  __pyx_ptype_6gevent_14_gevent_cqueue_Channel = &__pyx_type_6gevent_14_gevent_cqueue_Channel;
  #endif
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule("greenlet"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_greenlet = __Pyx_ImportType(__pyx_t_1, "greenlet", "greenlet", sizeof(PyGreenlet), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_greenlet) __PYX_ERR(2, 12, __pyx_L1_error)
  __pyx_t_2 = PyImport_ImportModule("gevent._gevent_c_greenlet_primitives"); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet = __Pyx_ImportType(__pyx_t_2, "gevent._gevent_c_greenlet_primitives", "TrackedRawGreenlet", sizeof(struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_TrackedRawGreenlet) __PYX_ERR(2, 37, __pyx_L1_error)
  __pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop = __Pyx_ImportType(__pyx_t_2, "gevent._gevent_c_greenlet_primitives", "SwitchOutGreenletWithLoop", sizeof(struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop) __PYX_ERR(2, 40, __pyx_L1_error)
  __pyx_vtabptr_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop = (struct __pyx_vtabstruct_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop*)__Pyx_GetVtable(__pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop); if (unlikely(!__pyx_vtabptr_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop)) __PYX_ERR(2, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyImport_ImportModule("greenlet"); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_ptype_6gevent_16_gevent_c_waiter_greenlet = __Pyx_ImportType(__pyx_t_2, "greenlet", "greenlet", sizeof(PyGreenlet), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_16_gevent_c_waiter_greenlet) __PYX_ERR(3, 15, __pyx_L1_error)
  __pyx_t_1 = PyImport_ImportModule("gevent._gevent_c_waiter"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter = __Pyx_ImportType(__pyx_t_1, "gevent._gevent_c_waiter", "MultipleWaiter", sizeof(struct __pyx_obj_6gevent_16_gevent_c_waiter_MultipleWaiter), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter) __PYX_ERR(3, 47, __pyx_L1_error)
  __pyx_vtabptr_6gevent_16_gevent_c_waiter_MultipleWaiter = (struct __pyx_vtabstruct_6gevent_16_gevent_c_waiter_MultipleWaiter*)__Pyx_GetVtable(__pyx_ptype_6gevent_16_gevent_c_waiter_MultipleWaiter); if (unlikely(!__pyx_vtabptr_6gevent_16_gevent_c_waiter_MultipleWaiter)) __PYX_ERR(3, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("greenlet"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6gevent_27_gevent_c_abstract_linkable_greenlet = __Pyx_ImportType(__pyx_t_1, "greenlet", "greenlet", sizeof(PyGreenlet), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_greenlet) __PYX_ERR(4, 13, __pyx_L1_error)
  __pyx_t_2 = PyImport_ImportModule("gevent._gevent_c_abstract_linkable"); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable = __Pyx_ImportType(__pyx_t_2, "gevent._gevent_c_abstract_linkable", "AbstractLinkable", sizeof(struct __pyx_obj_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable) __PYX_ERR(4, 33, __pyx_L1_error)
  __pyx_vtabptr_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable = (struct __pyx_vtabstruct_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable*)__Pyx_GetVtable(__pyx_ptype_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable); if (unlikely(!__pyx_vtabptr_6gevent_27_gevent_c_abstract_linkable_AbstractLinkable)) __PYX_ERR(4, 33, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyImport_ImportModule("gevent._gevent_cevent"); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_ptype_6gevent_14_gevent_cevent_Event = __Pyx_ImportType(__pyx_t_2, "gevent._gevent_cevent", "Event", sizeof(struct __pyx_obj_6gevent_14_gevent_cevent_Event), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_14_gevent_cevent_Event) __PYX_ERR(5, 13, __pyx_L1_error)
  __pyx_vtabptr_6gevent_14_gevent_cevent_Event = (struct __pyx_vtabstruct_6gevent_14_gevent_cevent_Event*)__Pyx_GetVtable(__pyx_ptype_6gevent_14_gevent_cevent_Event); if (unlikely(!__pyx_vtabptr_6gevent_14_gevent_cevent_Event)) __PYX_ERR(5, 13, __pyx_L1_error)
  __pyx_ptype_6gevent_14_gevent_cevent_AsyncResult = __Pyx_ImportType(__pyx_t_2, "gevent._gevent_cevent", "AsyncResult", sizeof(struct __pyx_obj_6gevent_14_gevent_cevent_AsyncResult), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_6gevent_14_gevent_cevent_AsyncResult) __PYX_ERR(5, 16, __pyx_L1_error)
  __pyx_vtabptr_6gevent_14_gevent_cevent_AsyncResult = (struct __pyx_vtabstruct_6gevent_14_gevent_cevent_AsyncResult*)__Pyx_GetVtable(__pyx_ptype_6gevent_14_gevent_cevent_AsyncResult); if (unlikely(!__pyx_vtabptr_6gevent_14_gevent_cevent_AsyncResult)) __PYX_ERR(5, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __pyx_t_1 = PyImport_ImportModule("gevent._gevent_c_greenlet_primitives"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "get_objects", (void **)&__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_get_objects, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "wref", (void **)&__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_wref, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "BlockingSwitchOutError", (void **)&__pyx_vp_6gevent_29_gevent_c_greenlet_primitives_BlockingSwitchOutError, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "_greenlet_imported", (void **)&__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__greenlet_imported, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "_memoryview", (void **)&__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__memoryview, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_1, "_buffer", (void **)&__pyx_vp_6gevent_29_gevent_c_greenlet_primitives__buffer, "PyTypeObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = PyImport_ImportModule("gevent._gevent_c_hub_local"); if (!__pyx_t_2) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_2, "_threadlocal", (void **)&__pyx_vp_6gevent_19_gevent_c_hub_local__threadlocal, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = PyImport_ImportModule("gevent._gevent_c_waiter"); if (!__pyx_t_3) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_3, "sys", (void **)&__pyx_vp_6gevent_16_gevent_c_waiter_sys, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_3, "ConcurrentObjectUseError", (void **)&__pyx_vp_6gevent_16_gevent_c_waiter_ConcurrentObjectUseError, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_3, "_greenlet_imported", (void **)&__pyx_vp_6gevent_16_gevent_c_waiter__greenlet_imported, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_3, "_NONE", (void **)&__pyx_vp_6gevent_16_gevent_c_waiter__NONE, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = PyImport_ImportModule("gevent._gevent_c_abstract_linkable"); if (!__pyx_t_4) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_4, "InvalidSwitchError", (void **)&__pyx_vp_6gevent_27_gevent_c_abstract_linkable_InvalidSwitchError, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_4, "Timeout", (void **)&__pyx_vp_6gevent_27_gevent_c_abstract_linkable_Timeout, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_4, "_greenlet_imported", (void **)&__pyx_vp_6gevent_27_gevent_c_abstract_linkable__greenlet_imported, "int") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = PyImport_ImportModule("gevent._gevent_cevent"); if (!__pyx_t_5) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_5, "_None", (void **)&__pyx_vp_6gevent_14_gevent_cevent__None, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_5, "reraise", (void **)&__pyx_vp_6gevent_14_gevent_cevent_reraise, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_5, "dump_traceback", (void **)&__pyx_vp_6gevent_14_gevent_cevent_dump_traceback, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_5, "load_traceback", (void **)&__pyx_vp_6gevent_14_gevent_cevent_load_traceback, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportVoidPtr(__pyx_t_5, "Timeout", (void **)&__pyx_vp_6gevent_14_gevent_cevent_Timeout, "PyObject *") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("gevent._gevent_c_hub_local"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_hub_if_exists", (void (**)(void))&__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_if_exists, "struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *(int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "get_hub_noargs", (void (**)(void))&__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_noargs, "struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *(int __pyx_skip_dispatch)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec__gevent_cqueue(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__gevent_cqueue},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "_gevent_cqueue",
      __pyx_k_Synchronized_queues_The_mod_gev, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_COMPILING_IN_LIMITED_API
      sizeof(__pyx_mstate), /* m_size */
    #else
      -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_COMPILING_IN_LIMITED_API
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC init_gevent_cqueue(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC init_gevent_cqueue(void)
#else
__Pyx_PyMODINIT_FUNC PyInit__gevent_cqueue(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__gevent_cqueue(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) {
#else
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
#endif
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


  static CYTHON_SMALL_CODE int __pyx_pymod_exec__gevent_cqueue(PyObject *__pyx_pyinit_module)
  #endif
  #endif
  {
    PyObject *__pyx_t_1 = NULL;
    PyObject *__pyx_t_2 = NULL;
    int __pyx_t_3;
    int __pyx_t_4;
    int __pyx_t_5;
    PyObject *__pyx_t_6 = NULL;
    PyObject *__pyx_t_7 = NULL;
    PyObject *__pyx_t_8 = NULL;
    int __pyx_lineno = 0;
    const char *__pyx_filename = NULL;
    int __pyx_clineno = 0;
    __Pyx_RefNannyDeclarations
    #if CYTHON_PEP489_MULTI_PHASE_INIT
    if (__pyx_m) {
      if (__pyx_m == __pyx_pyinit_module) return 0;
      PyErr_SetString(PyExc_RuntimeError, "Module '_gevent_cqueue' has already been imported. Re-initialisation is not supported.");
      return -1;
    }
    #elif PY_MAJOR_VERSION >= 3
    if (__pyx_m) return __Pyx_NewRef(__pyx_m);
    #endif
    /*--- Module creation code ---*/
    #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_m = __pyx_pyinit_module;
    Py_INCREF(__pyx_m);
    #else
    #if PY_MAJOR_VERSION < 3
    __pyx_m = Py_InitModule4("_gevent_cqueue", __pyx_methods, __pyx_k_Synchronized_queues_The_mod_gev, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
    if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
    #elif CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely(PyState_AddModule(__pyx_t_1, &__pyx_moduledef) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    #else
    __pyx_m = PyModule_Create(&__pyx_moduledef);
    if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    #endif
    #if !CYTHON_COMPILING_IN_LIMITED_API
    __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
    Py_INCREF(__pyx_d);
    #endif
    __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
    Py_INCREF(__pyx_b);
    __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
    Py_INCREF(__pyx_cython_runtime);
    if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
    #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
    __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__gevent_cqueue(void)", 0);
    if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #ifdef __Pxy_PyFrame_Initialize_Offsets
    __Pxy_PyFrame_Initialize_Offsets();
    #endif
    __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
    __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
    __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
    #ifdef __Pyx_CyFunction_USED
    if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    #ifdef __Pyx_FusedFunction_USED
    if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    #ifdef __Pyx_Generator_USED
    if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    #ifdef __Pyx_AsyncGen_USED
    if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    #ifdef __Pyx_StopAsyncIteration_USED
    if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    /*--- Library function declarations ---*/
    /*--- Threads initialization code ---*/
    #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
    PyEval_InitThreads();
    #endif
    /*--- Initialize various global constants etc. ---*/
    if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
    if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    if (__pyx_module_is_main_gevent___gevent_cqueue) {
      if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    }
    #if PY_MAJOR_VERSION >= 3
    {
      PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
      if (!PyDict_GetItemString(modules, "gevent._gevent_cqueue")) {
        if (unlikely(PyDict_SetItemString(modules, "gevent._gevent_cqueue", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #endif
    /*--- Builtin init code ---*/
    if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    /*--- Constants init code ---*/
    if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    /*--- Global type/function init code ---*/
    (void)__Pyx_modinit_global_init_code();
    if (unlikely(__Pyx_modinit_variable_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (unlikely(__Pyx_modinit_variable_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    /*--- Execution code ---*/
    #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif

    /* "src/gevent/queue.py":31
 * 
 * from __future__ import absolute_import
 * import sys             # <<<<<<<<<<<<<<
 * from heapq import heappush as _heappush
 * from heapq import heappop as _heappop
 */
    __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 31, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }

    /* "src/gevent/queue.py":32
 * from __future__ import absolute_import
 * import sys
 * from heapq import heappush as _heappush             # <<<<<<<<<<<<<<
 * from heapq import heappop as _heappop
 * from heapq import heapify as _heapify
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_heappush_2);
    __Pyx_GIVEREF(__pyx_n_s_heappush_2);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_heappush_2);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_heapq, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_heappush_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_v_6gevent_14_gevent_cqueue__heappush);
    __Pyx_DECREF_SET(__pyx_v_6gevent_14_gevent_cqueue__heappush, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":33
 * import sys
 * from heapq import heappush as _heappush
 * from heapq import heappop as _heappop             # <<<<<<<<<<<<<<
 * from heapq import heapify as _heapify
 * import collections
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_heappop_2);
    __Pyx_GIVEREF(__pyx_n_s_heappop_2);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_heappop_2);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_heapq, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_heappop_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_v_6gevent_14_gevent_cqueue__heappop);
    __Pyx_DECREF_SET(__pyx_v_6gevent_14_gevent_cqueue__heappop, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/gevent/queue.py":34
 * from heapq import heappush as _heappush
 * from heapq import heappop as _heappop
 * from heapq import heapify as _heapify             # <<<<<<<<<<<<<<
 * import collections
 * 
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_heapify_2);
    __Pyx_GIVEREF(__pyx_n_s_heapify_2);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_heapify_2);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_heapq, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_heapify_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_v_6gevent_14_gevent_cqueue__heapify);
    __Pyx_DECREF_SET(__pyx_v_6gevent_14_gevent_cqueue__heapify, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":35
 * from heapq import heappop as _heappop
 * from heapq import heapify as _heapify
 * import collections             # <<<<<<<<<<<<<<
 * 
 * if sys.version_info[0] == 2:
 */
    __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_collections, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 35, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_collections, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "src/gevent/queue.py":37
 * import collections
 * 
 * if sys.version_info[0] == 2:             # <<<<<<<<<<<<<<
 *     import Queue as __queue__ # python 3: pylint:disable=import-error
 * else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_version_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 37, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "src/gevent/queue.py":38
 * 
 * if sys.version_info[0] == 2:
 *     import Queue as __queue__ # python 3: pylint:disable=import-error             # <<<<<<<<<<<<<<
 * else:
 *     import queue as __queue__ # python 2: pylint:disable=import-error
 */
      __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_Queue, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      {
        #if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 38, __pyx_L1_error)
        #endif
        if (PyDict_SetItem(__pyx_d, __pyx_n_s_queue_2, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }

      /* "src/gevent/queue.py":37
 * import collections
 * 
 * if sys.version_info[0] == 2:             # <<<<<<<<<<<<<<
 *     import Queue as __queue__ # python 3: pylint:disable=import-error
 * else:
 */
      goto __pyx_L2;
    }

    /* "src/gevent/queue.py":40
 *     import Queue as __queue__ # python 3: pylint:disable=import-error
 * else:
 *     import queue as __queue__ # python 2: pylint:disable=import-error             # <<<<<<<<<<<<<<
 * # We re-export these exceptions to client modules.
 * # But we also want fast access to them from Cython with a cdef,
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_queue, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      {
        #if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 40, __pyx_L1_error)
        #endif
        if (PyDict_SetItem(__pyx_d, __pyx_n_s_queue_2, __pyx_t_1) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
    }
    __pyx_L2:;

    /* "src/gevent/queue.py":44
 * # But we also want fast access to them from Cython with a cdef,
 * # and we do that with the _ definition.
 * _Full = Full = __queue__.Full             # <<<<<<<<<<<<<<
 * _Empty = Empty = __queue__.Empty
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_queue_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Full); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_v_6gevent_14_gevent_cqueue__Full);
    __Pyx_DECREF_SET(__pyx_v_6gevent_14_gevent_cqueue__Full, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 44, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_Full, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":45
 * # and we do that with the _ definition.
 * _Full = Full = __queue__.Full
 * _Empty = Empty = __queue__.Empty             # <<<<<<<<<<<<<<
 * 
 * from gevent.timeout import Timeout
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_queue_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_v_6gevent_14_gevent_cqueue__Empty);
    __Pyx_DECREF_SET(__pyx_v_6gevent_14_gevent_cqueue__Empty, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 45, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_Empty, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/gevent/queue.py":47
 * _Empty = Empty = __queue__.Empty
 * 
 * from gevent.timeout import Timeout             # <<<<<<<<<<<<<<
 * from gevent._hub_local import get_hub_noargs as get_hub
 * from gevent.exceptions import InvalidSwitchError
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_Timeout);
    __Pyx_GIVEREF(__pyx_n_s_Timeout);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Timeout);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_gevent_timeout, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_v_6gevent_14_gevent_cqueue_Timeout);
    __Pyx_DECREF_SET(__pyx_v_6gevent_14_gevent_cqueue_Timeout, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":48
 * 
 * from gevent.timeout import Timeout
 * from gevent._hub_local import get_hub_noargs as get_hub             # <<<<<<<<<<<<<<
 * from gevent.exceptions import InvalidSwitchError
 * 
 */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_get_hub_noargs);
    __Pyx_GIVEREF(__pyx_n_s_get_hub_noargs);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_hub_noargs);
    __pyx_t_1 = __Pyx_Import(__pyx_n_s_gevent__hub_local, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_hub_noargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 48, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_hub_noargs, __pyx_t_2) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/gevent/queue.py":49
 * from gevent.timeout import Timeout
 * from gevent._hub_local import get_hub_noargs as get_hub
 * from gevent.exceptions import InvalidSwitchError             # <<<<<<<<<<<<<<
 * 
 * __all__ = []
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_InvalidSwitchError);
    __Pyx_GIVEREF(__pyx_n_s_InvalidSwitchError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_InvalidSwitchError);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_gevent_exceptions, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_InvalidSwitchError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError);
    __Pyx_DECREF_SET(__pyx_v_6gevent_14_gevent_cqueue_InvalidSwitchError, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":51
 * from gevent.exceptions import InvalidSwitchError
 * 
 * __all__ = []             # <<<<<<<<<<<<<<
 * __implements__ = ['Queue', 'PriorityQueue', 'LifoQueue']
 * __extensions__ = ['JoinableQueue', 'Channel']
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 51, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_2) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "src/gevent/queue.py":52
 * 
 * __all__ = []
 * __implements__ = ['Queue', 'PriorityQueue', 'LifoQueue']             # <<<<<<<<<<<<<<
 * __extensions__ = ['JoinableQueue', 'Channel']
 * __imports__ = ['Empty', 'Full']
 */
    __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_Queue);
    __Pyx_GIVEREF(__pyx_n_s_Queue);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Queue);
    __Pyx_INCREF(__pyx_n_s_PriorityQueue);
    __Pyx_GIVEREF(__pyx_n_s_PriorityQueue);
    PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_PriorityQueue);
    __Pyx_INCREF(__pyx_n_s_LifoQueue);
    __Pyx_GIVEREF(__pyx_n_s_LifoQueue);
    PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_LifoQueue);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 52, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_implements, __pyx_t_2) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "src/gevent/queue.py":53
 * __all__ = []
 * __implements__ = ['Queue', 'PriorityQueue', 'LifoQueue']
 * __extensions__ = ['JoinableQueue', 'Channel']             # <<<<<<<<<<<<<<
 * __imports__ = ['Empty', 'Full']
 * if hasattr(__queue__, 'SimpleQueue'):
 */
    __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_JoinableQueue);
    __Pyx_GIVEREF(__pyx_n_s_JoinableQueue);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_JoinableQueue);
    __Pyx_INCREF(__pyx_n_s_Channel);
    __Pyx_GIVEREF(__pyx_n_s_Channel);
    PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Channel);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 53, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_extensions, __pyx_t_2) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "src/gevent/queue.py":54
 * __implements__ = ['Queue', 'PriorityQueue', 'LifoQueue']
 * __extensions__ = ['JoinableQueue', 'Channel']
 * __imports__ = ['Empty', 'Full']             # <<<<<<<<<<<<<<
 * if hasattr(__queue__, 'SimpleQueue'):
 *     __all__.append('SimpleQueue') # New in 3.7
 */
    __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_n_s_Empty);
    __Pyx_GIVEREF(__pyx_n_s_Empty);
    PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Empty);
    __Pyx_INCREF(__pyx_n_s_Full);
    __Pyx_GIVEREF(__pyx_n_s_Full);
    PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Full);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 54, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_imports, __pyx_t_2) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "src/gevent/queue.py":55
 * __extensions__ = ['JoinableQueue', 'Channel']
 * __imports__ = ['Empty', 'Full']
 * if hasattr(__queue__, 'SimpleQueue'):             # <<<<<<<<<<<<<<
 *     __all__.append('SimpleQueue') # New in 3.7
 *     # SimpleQueue is implemented in C and directly allocates locks
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_queue_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_HasAttr(__pyx_t_2, __pyx_n_s_SimpleQueue); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 55, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = (__pyx_t_3 != 0);
    if (__pyx_t_4) {

      /* "src/gevent/queue.py":56
 * __imports__ = ['Empty', 'Full']
 * if hasattr(__queue__, 'SimpleQueue'):
 *     __all__.append('SimpleQueue') # New in 3.7             # <<<<<<<<<<<<<<
 *     # SimpleQueue is implemented in C and directly allocates locks
 *     # unaffected by monkey patching. We need the Python version.
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_all); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_n_s_SimpleQueue); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 56, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/gevent/queue.py":59
 *     # SimpleQueue is implemented in C and directly allocates locks
 *     # unaffected by monkey patching. We need the Python version.
 *     SimpleQueue = __queue__._PySimpleQueue # pylint:disable=no-member             # <<<<<<<<<<<<<<
 * __all__ += (__implements__ + __extensions__ + __imports__)
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_queue_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PySimpleQueue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      {
        #if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 59, __pyx_L1_error)
        #endif
        if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleQueue, __pyx_t_1) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }

      /* "src/gevent/queue.py":55
 * __extensions__ = ['JoinableQueue', 'Channel']
 * __imports__ = ['Empty', 'Full']
 * if hasattr(__queue__, 'SimpleQueue'):             # <<<<<<<<<<<<<<
 *     __all__.append('SimpleQueue') # New in 3.7
 *     # SimpleQueue is implemented in C and directly allocates locks
 */
    }

    /* "src/gevent/queue.py":60
 *     # unaffected by monkey patching. We need the Python version.
 *     SimpleQueue = __queue__._PySimpleQueue # pylint:disable=no-member
 * __all__ += (__implements__ + __extensions__ + __imports__)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_all); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_implements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_extensions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_imports); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 60, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_6) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }

    /* "src/gevent/queue.py":74
 *         pass
 * 
 * import gevent._waiter             # <<<<<<<<<<<<<<
 * locals()['Waiter'] = gevent._waiter.Waiter
 * locals()['getcurrent'] = __import__('greenlet').getcurrent
 */
    __pyx_t_6 = __Pyx_Import(__pyx_n_s_gevent__waiter, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 74, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_gevent, __pyx_t_6) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }

    /* "src/gevent/queue.py":75
 * 
 * import gevent._waiter
 * locals()['Waiter'] = gevent._waiter.Waiter             # <<<<<<<<<<<<<<
 * locals()['getcurrent'] = __import__('greenlet').getcurrent
 * locals()['greenlet_init'] = lambda: None
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_gevent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_waiter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Waiter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely(PyDict_SetItem(__pyx_t_2, __pyx_n_s_Waiter, __pyx_t_6) < 0)) __PYX_ERR(0, 75, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "src/gevent/queue.py":76
 * import gevent._waiter
 * locals()['Waiter'] = gevent._waiter.Waiter
 * locals()['getcurrent'] = __import__('greenlet').getcurrent             # <<<<<<<<<<<<<<
 * locals()['greenlet_init'] = lambda: None
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getcurrent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(PyDict_SetItem(__pyx_t_6, __pyx_n_s_getcurrent, __pyx_t_2) < 0)) __PYX_ERR(0, 76, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":77
 * locals()['Waiter'] = gevent._waiter.Waiter
 * locals()['getcurrent'] = __import__('greenlet').getcurrent
 * locals()['greenlet_init'] = lambda: None             # <<<<<<<<<<<<<<
 * 
 * class ItemWaiter(Waiter): # pylint:disable=undefined-variable
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 77, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 77, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_2lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, NULL); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (unlikely(PyDict_SetItem(__pyx_t_6, __pyx_n_s_greenlet_init, __pyx_t_2) < 0)) __PYX_ERR(0, 77, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":82
 *     # pylint:disable=assigning-non-slot
 *     __slots__ = (
 *         'item',             # <<<<<<<<<<<<<<
 *         'queue',
 *     )
 */
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter->tp_dict, __pyx_n_s_slots, __pyx_tuple__10) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter);

    /* "src/gevent/queue.py":91
 *         self.queue = queue
 * 
 *     def put_and_switch(self):             # <<<<<<<<<<<<<<
 *         self.queue._put(self.item)
 *         self.queue = None
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 91, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 91, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_10ItemWaiter_3put_and_switch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ItemWaiter_put_and_switch, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__12)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter->tp_dict, __pyx_n_s_put_and_switch, __pyx_t_2) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_ItemWaiter);

    /* "src/gevent/queue.py":119
 * 
 *     __slots__ = (
 *         '_maxsize',             # <<<<<<<<<<<<<<
 *         'getters',
 *         'putters',
 */
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_slots, __pyx_tuple__13) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":169
 *             self._maxsize = nv
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return type(self)(self.maxsize, self.queue)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 169, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 169, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_copy, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__15)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":172
 *         return type(self)(self.maxsize, self.queue)
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return collections.deque(items)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 172, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 172, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_5_create_queue, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__create_queue, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__17)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_create_queue, __pyx_t_2) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":175
 *         return collections.deque(items)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return self.queue.popleft()
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 175, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 175, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_7_get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__get, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__19)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 175, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":178
 *         return self.queue.popleft()
 * 
 *     def _peek(self):             # <<<<<<<<<<<<<<
 *         return self.queue[0]
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 178, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_9_peek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__peek, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__21)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_peek, __pyx_t_2) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":181
 *         return self.queue[0]
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         self.queue.append(item)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 181, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 181, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_11_put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__put, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__23)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_put, __pyx_t_2) < 0) __PYX_ERR(0, 181, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":190
 *         return '<%s%s>' % (type(self).__name__, self._format())
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = []
 *         if self.maxsize is not None:
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 190, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 190, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_17_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__format, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__25)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_format, __pyx_t_2) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":204
 *         return ''
 * 
 *     def qsize(self):             # <<<<<<<<<<<<<<
 *         """Return the size of the queue."""
 *         return len(self.queue)
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 204, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 204, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_19qsize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_qsize, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__27)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_qsize, __pyx_t_2) < 0) __PYX_ERR(0, 204, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":236
 *         return True
 * 
 *     def empty(self):             # <<<<<<<<<<<<<<
 *         """Return ``True`` if the queue is empty, ``False`` otherwise."""
 *         return not self.qsize()
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 236, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 236, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_27empty, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_empty, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__29)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_empty, __pyx_t_2) < 0) __PYX_ERR(0, 236, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":240
 *         return not self.qsize()
 * 
 *     def full(self):             # <<<<<<<<<<<<<<
 *         """Return ``True`` if the queue is full, ``False`` otherwise.
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 240, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 240, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_29full, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_full, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__31)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_full, __pyx_t_2) < 0) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":247
 *         return self._maxsize > 0 and self.qsize() >= self._maxsize
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Put an item into the queue.
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 247, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_31put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_put, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__33)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_put_2, __pyx_t_2) < 0) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":289
 *             raise Full
 * 
 *     def put_nowait(self, item):             # <<<<<<<<<<<<<<
 *         """Put an item into the queue without blocking.
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 289, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 289, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_33put_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_put_nowait, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__35)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_put_nowait, __pyx_t_2) < 0) __PYX_ERR(0, 289, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":334
 *             _safe_remove(self.getters, waiter)
 * 
 *     def get(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Remove and return an item from the queue.
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 334, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 334, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_35get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_get, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__37)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_get_2, __pyx_t_2) < 0) __PYX_ERR(0, 334, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":351
 *         return self.__get_or_peek(self._get, block, timeout)
 * 
 *     def get_nowait(self):             # <<<<<<<<<<<<<<
 *         """Remove and return an item from the queue without blocking.
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 351, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 351, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_37get_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_get_nowait, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__39)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_get_nowait, __pyx_t_2) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":359
 *         return self.get(False)
 * 
 *     def peek(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         """Return an item from the queue without removing it.
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 359, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 359, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_39peek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_peek, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__41)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_peek_2, __pyx_t_2) < 0) __PYX_ERR(0, 359, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":376
 *         return self.__get_or_peek(self._peek, block, timeout)
 * 
 *     def peek_nowait(self):             # <<<<<<<<<<<<<<
 *         """Return an item from the queue without blocking.
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 376, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 376, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_41peek_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_peek_nowait, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__43)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_peek_nowait, __pyx_t_2) < 0) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":384
 *         return self.peek(False)
 * 
 *     def _unlock(self):             # <<<<<<<<<<<<<<
 *         while True:
 *             repeat = False
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 384, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 384, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_5Queue_43_unlock, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__unlock, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__45)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_unlock, __pyx_t_2) < 0) __PYX_ERR(0, 384, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":416
 *         return result
 * 
 *     next = __next__ # Py2             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Queue->tp_dict, __pyx_n_s_next_2, __pyx_t_2) < 0) __PYX_ERR(0, 416, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Queue);

    /* "src/gevent/queue.py":423
 *     # be bound. Changing its maxsize has no effect.
 * 
 *     __slots__ = ()             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, maxsize=None, items=()):
 */
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue->tp_dict, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 423, __pyx_L1_error)
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue);

    /* "src/gevent/queue.py":431
 *         self.putters = None # Will never be used.
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         self._put(item)
 *         if self.getters:
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 431, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 431, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_12UnboundQueue_3put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UnboundQueue_put, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__47)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue->tp_dict, __pyx_n_s_put_2, __pyx_t_2) < 0) __PYX_ERR(0, 431, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_UnboundQueue);

    /* "src/gevent/queue.py":448
 *     '''
 * 
 *     __slots__ = ()             # <<<<<<<<<<<<<<
 * 
 *     def _create_queue(self, items=()):
 */
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue->tp_dict, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue);

    /* "src/gevent/queue.py":450
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         q = list(items)
 *         _heapify(q)
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 450, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 450, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_13PriorityQueue_1_create_queue, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PriorityQueue__create_queue, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__49)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue->tp_dict, __pyx_n_s_create_queue, __pyx_t_2) < 0) __PYX_ERR(0, 450, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue);

    /* "src/gevent/queue.py":455
 *         return q
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         _heappush(self.queue, item)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 455, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 455, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_13PriorityQueue_3_put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PriorityQueue__put, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__51)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue->tp_dict, __pyx_n_s_put, __pyx_t_2) < 0) __PYX_ERR(0, 455, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue);

    /* "src/gevent/queue.py":458
 *         _heappush(self.queue, item)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return _heappop(self.queue)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 458, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 458, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_13PriorityQueue_5_get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PriorityQueue__get, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__53)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue->tp_dict, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_PriorityQueue);

    /* "src/gevent/queue.py":465
 *     '''A subclass of :class:`Queue` that retrieves most recently added entries first.'''
 * 
 *     __slots__ = ()             # <<<<<<<<<<<<<<
 * 
 *     def _create_queue(self, items=()):
 */
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue->tp_dict, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 465, __pyx_L1_error)
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue);

    /* "src/gevent/queue.py":467
 *     __slots__ = ()
 * 
 *     def _create_queue(self, items=()):             # <<<<<<<<<<<<<<
 *         return list(items)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 467, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 467, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_9LifoQueue_1_create_queue, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LifoQueue__create_queue, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__55)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue->tp_dict, __pyx_n_s_create_queue, __pyx_t_2) < 0) __PYX_ERR(0, 467, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue);

    /* "src/gevent/queue.py":470
 *         return list(items)
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         self.queue.append(item)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 470, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 470, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_9LifoQueue_3_put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LifoQueue__put, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__57)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue->tp_dict, __pyx_n_s_put, __pyx_t_2) < 0) __PYX_ERR(0, 470, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue);

    /* "src/gevent/queue.py":473
 *         self.queue.append(item)
 * 
 *     def _get(self):             # <<<<<<<<<<<<<<
 *         return self.queue.pop()
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 473, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 473, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_9LifoQueue_5_get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LifoQueue__get, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__59)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue->tp_dict, __pyx_n_s_get, __pyx_t_2) < 0) __PYX_ERR(0, 473, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue);

    /* "src/gevent/queue.py":476
 *         return self.queue.pop()
 * 
 *     def _peek(self):             # <<<<<<<<<<<<<<
 *         return self.queue[-1]
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 476, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 476, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_9LifoQueue_7_peek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LifoQueue__peek, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__61)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue->tp_dict, __pyx_n_s_peek, __pyx_t_2) < 0) __PYX_ERR(0, 476, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_LifoQueue);

    /* "src/gevent/queue.py":487
 * 
 *     __slots__ = (
 *         '_cond',             # <<<<<<<<<<<<<<
 *         'unfinished_tasks',
 *     )
 */
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue->tp_dict, __pyx_n_s_slots, __pyx_tuple__62) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue);

    /* "src/gevent/queue.py":515
 *             self._cond.clear()
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 515, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 515, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue_copy, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__64)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue->tp_dict, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue);

    /* "src/gevent/queue.py":518
 *         return type(self)(self.maxsize, self.queue, self.unfinished_tasks)
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = Queue._format(self)
 *         if self.unfinished_tasks:
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 518, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 518, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_5_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue__format, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__66)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue->tp_dict, __pyx_n_s_format, __pyx_t_2) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue);

    /* "src/gevent/queue.py":524
 *         return result
 * 
 *     def _put(self, item):             # <<<<<<<<<<<<<<
 *         Queue._put(self, item)
 *         self.unfinished_tasks += 1
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 524, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 524, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_7_put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue__put, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__68)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue->tp_dict, __pyx_n_s_put, __pyx_t_2) < 0) __PYX_ERR(0, 524, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue);

    /* "src/gevent/queue.py":529
 *         self._cond.clear()
 * 
 *     def task_done(self):             # <<<<<<<<<<<<<<
 *         '''Indicate that a formerly enqueued task is complete. Used by queue consumer threads.
 *         For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 529, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_9task_done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue_task_done, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__70)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue->tp_dict, __pyx_n_s_task_done, __pyx_t_2) < 0) __PYX_ERR(0, 529, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue);

    /* "src/gevent/queue.py":546
 *             self._cond.set()
 * 
 *     def join(self, timeout=None):             # <<<<<<<<<<<<<<
 *         '''
 *         Block until all items in the queue have been gotten and processed.
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 546, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 546, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_13JoinableQueue_11join, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue_join, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__72)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue->tp_dict, __pyx_n_s_join, __pyx_t_2) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_JoinableQueue);

    /* "src/gevent/queue.py":569
 * 
 *     __slots__ = (
 *         'getters',             # <<<<<<<<<<<<<<
 *         'putters',
 *         'hub',
 */
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_slots, __pyx_tuple__73) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":591
 *         return '<%s %s>' % (type(self).__name__, self._format())
 * 
 *     def _format(self):             # <<<<<<<<<<<<<<
 *         result = ''
 *         if self.getters:
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 591, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 591, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_7_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel__format, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__75)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_format, __pyx_t_2) < 0) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":603
 *         return len(self.putters) - len(self.getters)
 * 
 *     def qsize(self):             # <<<<<<<<<<<<<<
 *         return 0
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 603, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_9qsize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_qsize, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__77)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_qsize, __pyx_t_2) < 0) __PYX_ERR(0, 603, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":606
 *         return 0
 * 
 *     def empty(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 606, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 606, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_11empty, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_empty, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__79)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_empty, __pyx_t_2) < 0) __PYX_ERR(0, 606, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":609
 *         return True
 * 
 *     def full(self):             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 609, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 609, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_13full, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_full, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__81)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_full, __pyx_t_2) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":612
 *         return True
 * 
 *     def put(self, item, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.getters:
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 612, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 612, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_15put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_put, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__83)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_put_2, __pyx_t_2) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":639
 *             timeout.cancel()
 * 
 *     def put_nowait(self, item):             # <<<<<<<<<<<<<<
 *         self.put(item, False)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 639, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 639, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_17put_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_put_nowait, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__85)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_put_nowait, __pyx_t_2) < 0) __PYX_ERR(0, 639, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":642
 *         self.put(item, False)
 * 
 *     def get(self, block=True, timeout=None):             # <<<<<<<<<<<<<<
 *         if self.hub is getcurrent(): # pylint:disable=undefined-variable
 *             if self.putters:
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 642, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 642, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_19get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_get, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__87)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_get_2, __pyx_t_2) < 0) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":665
 *             timeout.close()
 * 
 *     def get_nowait(self):             # <<<<<<<<<<<<<<
 *         return self.get(False)
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 665, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 665, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_21get_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_get_nowait, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__89)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_get_nowait, __pyx_t_2) < 0) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":668
 *         return self.get(False)
 * 
 *     def _unlock(self):             # <<<<<<<<<<<<<<
 *         while self.putters and self.getters:
 *             getter = self.getters.popleft()
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 668, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 668, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_7Channel_23_unlock, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel__unlock, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__91)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_unlock, __pyx_t_2) < 0) __PYX_ERR(0, 668, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":688
 *         return result
 * 
 *     next = __next__ # Py2             # <<<<<<<<<<<<<<
 * 
 * def _init():
 */
    __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_14_gevent_cqueue_Channel->tp_dict, __pyx_n_s_next_2, __pyx_t_2) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    PyType_Modified(__pyx_ptype_6gevent_14_gevent_cqueue_Channel);

    /* "src/gevent/queue.py":690
 *     next = __next__ # Py2
 * 
 * def _init():             # <<<<<<<<<<<<<<
 *     greenlet_init() # pylint:disable=undefined-variable
 * 
 */
    #if CYTHON_COMPILING_IN_LIMITED_API
    __pyx_t_8 = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 690, __pyx_L1_error)
    #else
    __pyx_t_8 = __pyx_d;  if ((1)); else __PYX_ERR(0, 690, __pyx_L1_error);
    #endif
    __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_14_gevent_cqueue_1_init, 0, __pyx_n_s_init_2, NULL, __pyx_n_s_gevent__gevent_cqueue, __pyx_t_8, ((PyObject *)__pyx_codeobj__92)); __pyx_t_8 = NULL; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 690, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_init_2, __pyx_t_2) < 0) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "src/gevent/queue.py":693
 *     greenlet_init() # pylint:disable=undefined-variable
 * 
 * _init()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_init_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "src/gevent/queue.py":696
 * 
 * 
 * from gevent._util import import_c_accel             # <<<<<<<<<<<<<<
 * import_c_accel(globals(), 'gevent._queue')
 */
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_n_s_import_c_accel);
    __Pyx_GIVEREF(__pyx_n_s_import_c_accel);
    PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_import_c_accel);
    __pyx_t_2 = __Pyx_Import(__pyx_n_s_gevent__util, __pyx_t_6, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_import_c_accel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 696, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_import_c_accel, __pyx_t_6) < 0) __PYX_ERR(0, 696, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/gevent/queue.py":697
 * 
 * from gevent._util import import_c_accel
 * import_c_accel(globals(), 'gevent._queue')             # <<<<<<<<<<<<<<
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_import_c_accel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
    __Pyx_INCREF(__pyx_kp_s_gevent__queue);
    __Pyx_GIVEREF(__pyx_kp_s_gevent__queue);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_gevent__queue);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "src/gevent/queue.py":1
 * # Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.             # <<<<<<<<<<<<<<
 * # copyright (c) 2018 gevent
 * # cython: auto_pickle=False,embedsignature=True,always_allow_keywords=False
 */
    __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    {
      #if CYTHON_COMPILING_IN_LIMITED_API
      PyObject *__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
      #endif
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }

    /* "gevent/_gevent_cqueue.pxd":29
 *     return PyGreenlet_GetCurrent()
 * 
 * cdef inline void greenlet_init():             # <<<<<<<<<<<<<<
 *     global _greenlet_imported
 *     if not _greenlet_imported:
 */

    /*--- Wrapped vars code ---*/

    goto __pyx_L0;
    __pyx_L1_error:;
    __Pyx_XDECREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_2);
    __Pyx_XDECREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7);
    if (__pyx_m) {
      #if !CYTHON_COMPILING_IN_LIMITED_API
      if (__pyx_d) {
        #endif
        __Pyx_AddTraceback("init gevent._gevent_cqueue", __pyx_clineno, __pyx_lineno, __pyx_filename);
        #if !CYTHON_COMPILING_IN_LIMITED_API
      }
      Py_CLEAR(__pyx_m);
      #endif
    } else if (!PyErr_Occurred()) {
      PyErr_SetString(PyExc_ImportError, "init gevent._gevent_cqueue");
    }
    __pyx_L0:;
    __Pyx_RefNannyFinishContext();
    #if CYTHON_PEP489_MULTI_PHASE_INIT
    return (__pyx_m != NULL) ? 0 : -1;
    #elif PY_MAJOR_VERSION >= 3
    return __pyx_m;
    #else
    return;
    #endif
  }
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* TupleAndListFromArray */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        Py_INCREF(__pyx_empty_tuple);
        return __pyx_empty_tuple;
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals */
#include "src/gevent/_generated_include/BytesEquals_impl_e6e00372871fe30fd34336b41036f3e015446a55.h"
/* UnicodeEquals */
#include "src/gevent/_generated_include/UnicodeEquals_impl_59ff4e630bc7eaefcae1e033587e8b97b0bf7eb8.h"
/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;  // error
            return kwvalues[i];
        }
    }
    return NULL;  // not found (no exception set)
}
#endif

/* PyFunctionFastCall */
#include "src/gevent/_generated_include/PyFunctionFastCall_impl_23aa93c516a67d08413dd8d375c3fa410709cf67.h"
/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
#include "src/gevent/_generated_include/PyObjectFastCall_impl_6fa5c40c40381c97b2831dbd0bcad716a6132361.h"
/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#include "src/gevent/_generated_include/SaveResetException_impl_aedbf2748eb5b27c9f4cebc299037ac835fcf451.h"
/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
#include "src/gevent/_generated_include/ParseKeywords_impl_416cf95624aff4d68f7f7d25051933788f0cbf29.h"
/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* PyIntCompare */
#include "src/gevent/_generated_include/PyIntCompare_impl_a817551de071429e8b0259e28f573a431ec1a019.h"
/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                #if CYTHON_COMPILING_IN_LIMITED_API
                module = PyImport_ImportModuleLevelObject(
                    name, empty_dict, empty_dict, from_list, 1);
                #else
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                #endif
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            #if CYTHON_COMPILING_IN_LIMITED_API
            module = PyImport_ImportModuleLevelObject(
                name, empty_dict, empty_dict, from_list, level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        PyObject *sep;
        PyObject *slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, CYTHON_UNUSED PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s_;
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    Py_ssize_t i, nparts;
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (likely(module))
        return module;
    return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* PyDictVersioning */
#include "src/gevent/_generated_include/PyDictVersioning_impl_5d2c788aa0ccc0a3db24046a954a7d21f6726dad.h"
/* GetModuleGlobalName */
#include "src/gevent/_generated_include/GetModuleGlobalName_impl_b42bab931ba3745b018435df793919dd990408d3.h"
/* GetItemInt */
#include "src/gevent/_generated_include/GetItemInt_impl_7e4cf5b23081c67c512b5769aad99623e914619a.h"
/* PyObjectCall2Args */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectCallOneArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod */
#include "src/gevent/_generated_include/PyObjectGetMethod_impl_b49ab712727dbe8719b82ffa378f93ad0a79258a.h"
/* PyObjectCallMethod1 */
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r;
#if CYTHON_USE_TYPE_SLOTS
    if (likely(PyString_Check(n))) {
        r = __Pyx_PyObject_GetAttrStrNoError(o, n);
        if (unlikely(!r) && likely(!PyErr_Occurred())) {
            r = __Pyx_NewRef(d);
        }
        return r;
    }
#endif
    r = PyObject_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* StringJoin */
#if !CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
}
#endif

/* WriteUnraisableException */
#include "src/gevent/_generated_include/WriteUnraisableException_impl_bb720a9484a33a914be38c511f50d067baf0ae4b.h"
/* RaiseException */
#include "src/gevent/_generated_include/RaiseException_impl_dc7a1bcbf0e57f6f65f1cdd7d7918783bde26c00.h"
/* GetException */
#include "src/gevent/_generated_include/GetException_impl_c515116ac859b567f8675f64eac308e9ac5196e2.h"
/* SwapException */
#include "src/gevent/_generated_include/SwapException_impl_59bda2db869a22e8e71fecade8d489392900a947.h"
/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg = NULL;
    return __Pyx_PyObject_FastCall(func, (&arg)+1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* pop */
static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) {
    if (__Pyx_IS_TYPE(L, &PySet_Type)) {
        return PySet_Pop(L);
    }
    return __Pyx_PyObject_CallMethod0(L, __pyx_n_s_pop);
}
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) {
    if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) {
        Py_SIZE(L) -= 1;
        return PyList_GET_ITEM(L, PyList_GET_SIZE(L));
    }
    return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_pop, L);
}
#endif

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* PyIntCompare */
#include "src/gevent/_generated_include/PyIntCompare_impl_65e87fc3c48b6fb36d2a0706bf39e4f9d55a4334.h"
/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
#if CYTHON_FAST_THREAD_STATE
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject* exc_type = tstate->curexc_type;
    if (unlikely(exc_type)) {
        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
            PyObject *exc_value, *exc_tb;
            exc_value = tstate->curexc_value;
            exc_tb = tstate->curexc_traceback;
            tstate->curexc_type = 0;
            tstate->curexc_value = 0;
            tstate->curexc_traceback = 0;
            Py_DECREF(exc_type);
            Py_XDECREF(exc_value);
            Py_XDECREF(exc_tb);
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#else
    if (unlikely(PyErr_Occurred())) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
#endif
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

/* CallNextTpDealloc */
static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_dealloc != current_tp_dealloc)
        type = type->tp_base;
    while (type && type->tp_dealloc == current_tp_dealloc)
        type = type->tp_base;
    if (type)
        type->tp_dealloc(obj);
}

/* CallNextTpTraverse */
static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_traverse != current_tp_traverse)
        type = type->tp_base;
    while (type && type->tp_traverse == current_tp_traverse)
        type = type->tp_base;
    if (type && type->tp_traverse)
        return type->tp_traverse(obj, v, a);
    return 0;
}

/* CallNextTpClear */
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
    PyTypeObject* type = Py_TYPE(obj);
    while (type && type->tp_clear != current_tp_clear)
        type = type->tp_base;
    while (type && type->tp_clear == current_tp_clear)
        type = type->tp_base;
    if (type && type->tp_clear)
        type->tp_clear(obj);
}

/* TypeImport */
#include "src/gevent/_generated_include/TypeImport_impl_2a4fd5b6753492bf016ba4bb4b7299ed55d65264.h"
/* PyObject_GenericGetAttrNoDict */
#include "src/gevent/_generated_include/PyObject_GenericGetAttrNoDict_impl_e75c615a9b8ba320c1d7b79e41a8e95244db0acc.h"
/* PyObject_GenericGetAttr */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* SetVTable */
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_SetVtable(PyObject *type, void *vtable) {
#else
static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#endif
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
    if (!ob)
        goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (PyObject_SetAttr(type, __pyx_n_s_pyx_vtable, ob) < 0)
#else
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
#endif
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetVTable */
  static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* GetAttr */
  static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* HasAttr */
  static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (!r) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* FetchCommonType */
  #include "src/gevent/_generated_include/FetchCommonType_impl_63de30adebaad806a4c974be4f8d0ebaab987991.h"
/* PyVectorcallFastCallDict */
  #include "src/gevent/_generated_include/PyVectorcallFastCallDict_impl_eac9cf6857ee83a6c2cd96e8ba80723ebd22f6b4.h"
/* CythonFunctionShared */
  #include "src/gevent/_generated_include/CythonFunctionShared_impl_e0793f49a6bfd013455ca3a436c59a2de3ecaa4b.h"
/* CythonFunction */
  static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* GetNameInClass */
  static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    PyObject *dict;
    assert(PyType_Check(nmspace));
#if CYTHON_USE_TYPE_SLOTS
    dict = ((PyTypeObject*)nmspace)->tp_dict;
    Py_XINCREF(dict);
#else
    dict = PyObject_GetAttr(nmspace, __pyx_n_s_dict);
#endif
    if (likely(dict)) {
        result = PyObject_GetItem(dict, name);
        Py_DECREF(dict);
        if (result) {
            return result;
        }
    }
    PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}

/* Globals */
  static PyObject* __Pyx_Globals(void) {
    PyObject *globals;
#if CYTHON_COMPILING_IN_LIMITED_API
    globals = PyModule_GetDict(__pyx_m);
    if (unlikely(!globals)) return NULL;
#else
    globals = __pyx_d;
#endif
    Py_INCREF(globals);
    return globals;
}

/* CLineInTraceback */
  #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
  #include "src/gevent/_generated_include/CodeObjectCache_impl_9806d8691f0647604c43940c16bcbdf8b5ddae48.h"
/* AddTraceback */
  #include "src/gevent/_generated_include/AddTraceback_impl_b5c78188883744b3dfae78a4f03fe3ccce2f3e32.h"
/* CIntToPy */
  #include "src/gevent/_generated_include/CIntToPy_impl_4d7a9f323170f70b8c17875021a2b230d507c8db.h"
/* CIntFromPyVerify */
  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
  #include "src/gevent/_generated_include/CIntToPy_impl_a3aeb95e07449af5f28f781285e1f39746a0b7bb.h"
/* CIntFromPy */
  #include "src/gevent/_generated_include/CIntFromPy_impl_1a0f80d1718a80e229744b66d97b249ae442ef87.h"
/* CIntFromPy */
  #include "src/gevent/_generated_include/CIntFromPy_impl_299af241fdbdaf0f7f531d27eea66ca66f2c4157.h"
/* FastTypeChecks */
  #include "src/gevent/_generated_include/FastTypeChecks_impl_eb0c244bcedc6e568c1b81c159a26dc4457239fd.h"
/* CheckBinaryVersion */
  static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* PyObjectSetAttrStr */
  #if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* VoidPtrExport */
  static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) {
    PyObject *d;
    PyObject *cobj = 0;
    d = PyDict_GetItem(__pyx_d, __pyx_n_s_pyx_capi);
    Py_XINCREF(d);
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (__Pyx_PyObject_SetAttrStr(__pyx_m, __pyx_n_s_pyx_capi, d) < 0)
            goto bad;
    }
    cobj = PyCapsule_New(p, sig, 0);
    if (!cobj)
        goto bad;
    if (PyDict_SetItem(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* FunctionExport */
  static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
    cobj = PyCapsule_New(tmp.p, sig, 0);
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* VoidPtrImport */
  #ifndef __PYX_HAVE_RT_ImportVoidPtr
#define __PYX_HAVE_RT_ImportVoidPtr
static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, name);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C variable %.200s",
                PyModule_GetName(module), name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* FunctionImport */
  #include "src/gevent/_generated_include/FunctionImport_impl_d1678083a4ac2cd86d7acbe656654e542e33839d.h"
/* InitStrings */
  #include "src/gevent/_generated_include/InitStrings_impl_d88d4d6dd5d0fce8587ddcc8c2c64ec7a0161e7c.h"
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                __Pyx_PyType_Name(Py_TYPE(result)))) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, __Pyx_PyType_Name(Py_TYPE(result)));
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
