Generated by Cython 3.1.2

Yellow lines hint at Python interaction.
Click on a line that starts with a "`+`" to see the C code that Cython generated for it.

Raw output: greenlet.c

    +0001: # Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.

      __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0002: # cython: auto_pickle=False,embedsignature=True,always_allow_keywords=False

     0003: # pylint:disable=too-many-lines

     0004: from __future__ import absolute_import, print_function, division

     0005:

    +0006: from sys import _getframe as sys_getframe

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_getframe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getframe); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_getframe);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_sys_getframe, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0007: from sys import exc_info as sys_exc_info

      __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0008: from weakref import ref as wref

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_weakref, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_wref);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_wref, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0009:

     0010: # XXX: How to get cython to let us rename this as RawGreenlet

     0011: # like we prefer?

    +0012: from greenlet import greenlet

      __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_greenlet); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_greenlet, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __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;

    +0013: from greenlet import GreenletExit

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_GreenletExit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_greenlet, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GreenletExit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0014:

    +0015: from gevent._compat import reraise

      __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_reraise); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__compat, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_reraise); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_reraise);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_reraise, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0016: from gevent._compat import PYPY as _PYPY

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_PYPY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__compat, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PYPY_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 16, __pyx_L1_error)
      __pyx_v_6gevent_17_gevent_cgreenlet__PYPY = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0017: from gevent._tblib import dump_traceback

      __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_dump_traceback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__tblib, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_dump_traceback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_dump_traceback);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_dump_traceback, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0018: from gevent._tblib import load_traceback

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_load_traceback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__tblib, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_load_traceback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_load_traceback);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_load_traceback, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0019:

    +0020: from gevent.exceptions import InvalidSwitchError

      __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_InvalidSwitchError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent_exceptions, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_InvalidSwitchError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0021:

    +0022: from gevent._hub_primitives import iwait_on_objects as iwait

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_iwait_on_objects); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__hub_primitives, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_iwait_on_objects); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_iwait);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_iwait, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0023: from gevent._hub_primitives import wait_on_objects as wait

      __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_wait_on_objects); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__hub_primitives, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_wait_on_objects); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_wait);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_wait, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0024:

    +0025: from gevent.timeout import Timeout

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_Timeout); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent_timeout, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Timeout); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0026:

    +0027: from gevent._config import config as GEVENT_CONFIG

      __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_config); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__config, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_config); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet_GEVENT_CONFIG);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet_GEVENT_CONFIG, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0028: from gevent._util import readproperty

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_readproperty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__util, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 28, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_readproperty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_readproperty, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0029: from gevent._hub_local import get_hub_noargs as get_hub

      __pyx_t_3 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_get_hub_noargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__hub_local, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_hub_noargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_hub_noargs, __pyx_t_3) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0030: from gevent import _waiter

      __pyx_t_2 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_waiter_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_waiter_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_waiter_2, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0031:

     0032:

    +0033: __all__ = [

      __pyx_t_3 = __Pyx_PyList_Pack(3, __pyx_mstate_global->__pyx_n_u_Greenlet_2, __pyx_mstate_global->__pyx_n_u_joinall, __pyx_mstate_global->__pyx_n_u_killall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_3) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0034:     'Greenlet',

     0035:     'joinall',

     0036:     'killall',

     0037: ]

     0038:

     0039:

     0040: # In Cython, we define these as 'cdef inline' functions. The

     0041: # compilation unit cannot have a direct assignment to them (import

     0042: # is assignment) without generating a 'lvalue is not valid target'

     0043: # error.

    +0044: locals()['getcurrent'] = __import__('greenlet').getcurrent

      __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_builtin___import__);
      __pyx_t_5 = __pyx_builtin___import__;
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_greenlet};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getcurrent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely((PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_getcurrent, __pyx_t_5) < 0))) __PYX_ERR(0, 44, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +0045: locals()['greenlet_init'] = lambda: None

    /* "src/gevent/greenlet.py":45
     * # error.
     * locals()['getcurrent'] = __import__('greenlet').getcurrent
     * locals()['greenlet_init'] = lambda: None             # <<<<<<<<<<<<<<
     * locals()['Waiter'] = _waiter.Waiter
     * # With Cython, this raises a TypeError if the parent is *not*
    */

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

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

    static PyObject *__pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;
      __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/greenlet.py":45
     * # error.
     * locals()['getcurrent'] = __import__('greenlet').getcurrent
     * locals()['greenlet_init'] = lambda: None             # <<<<<<<<<<<<<<
     * locals()['Waiter'] = _waiter.Waiter
     * # With Cython, this raises a TypeError if the parent is *not*
    */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_6lambda, 0, __pyx_mstate_global->__pyx_n_u_lambda, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely((PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_greenlet_init, __pyx_t_5) < 0))) __PYX_ERR(0, 45, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +0046: locals()['Waiter'] = _waiter.Waiter

      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_waiter_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Waiter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 46, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely((PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Waiter, __pyx_t_3) < 0))) __PYX_ERR(0, 46, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0047: # With Cython, this raises a TypeError if the parent is *not*

     0048: # the hub (SwitchOutGreenletWithLoop); in pure-Python, we will

     0049: # very likely get an AttributeError immediately after when we access `loop`;

     0050: # The TypeError message is more informative on Python 2.

     0051: # This must ONLY be called when we know that `s` is not None and is in fact a greenlet

     0052: # object (e.g., when called on `self`)

    +0053: locals()['get_my_hub'] = lambda s: s.parent

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_7lambda1(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_7lambda1 = {"lambda1", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_7lambda1, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_7lambda1(PyObject *__pyx_self, PyObject *__pyx_v_s) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda1(__pyx_self, ((PyObject *)__pyx_v_s));

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

    static PyObject *__pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __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_cgreenlet.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_7lambda1, 0, __pyx_mstate_global->__pyx_n_u_lambda, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely((PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_my_hub, __pyx_t_3) < 0))) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0054: # This must also ONLY be called when we know that S is not None and is in fact a greenlet

     0055: # object (including the result of getcurrent())

    +0056: locals()['get_generic_parent'] = lambda s: s.parent

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8lambda2(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8lambda2 = {"lambda2", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8lambda2, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8lambda2(PyObject *__pyx_self, PyObject *__pyx_v_s) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda2(__pyx_self, ((PyObject *)__pyx_v_s));

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

    static PyObject *__pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __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_cgreenlet.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8lambda2, 0, __pyx_mstate_global->__pyx_n_u_lambda, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely((PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_generic_parent, __pyx_t_3) < 0))) __PYX_ERR(0, 56, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0057:

     0058: # Frame access

    +0059: locals()['Gevent_PyFrame_GetCode'] = lambda frame: frame.f_code

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_9lambda3(PyObject *__pyx_self, PyObject *__pyx_v_frame); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_9lambda3 = {"lambda3", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_9lambda3, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_9lambda3(PyObject *__pyx_self, PyObject *__pyx_v_frame) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda3(__pyx_self, ((PyObject *)__pyx_v_frame));

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

    static PyObject *__pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_mstate_global->__pyx_n_u_f_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __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_cgreenlet.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_9lambda3, 0, __pyx_mstate_global->__pyx_n_u_lambda, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 59, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely((PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Gevent_PyFrame_GetCode, __pyx_t_3) < 0))) __PYX_ERR(0, 59, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0060: locals()['Gevent_PyFrame_GetLineNumber'] = lambda frame: frame.f_lineno

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_10lambda4(PyObject *__pyx_self, PyObject *__pyx_v_frame); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_10lambda4 = {"lambda4", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_10lambda4, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_10lambda4(PyObject *__pyx_self, PyObject *__pyx_v_frame) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda4(__pyx_self, ((PyObject *)__pyx_v_frame));

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

    static PyObject *__pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_mstate_global->__pyx_n_u_f_lineno); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __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_cgreenlet.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_10lambda4, 0, __pyx_mstate_global->__pyx_n_u_lambda, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely((PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Gevent_PyFrame_GetLineNumber, __pyx_t_3) < 0))) __PYX_ERR(0, 60, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0061: locals()['Gevent_PyFrame_GetBack'] = lambda frame: frame.f_back

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_11lambda5(PyObject *__pyx_self, PyObject *__pyx_v_frame); /*proto*/
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_11lambda5 = {"lambda5", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_11lambda5, METH_O, 0};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_11lambda5(PyObject *__pyx_self, PyObject *__pyx_v_frame) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda5(__pyx_self, ((PyObject *)__pyx_v_frame));

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

    static PyObject *__pyx_lambda_funcdef_6gevent_17_gevent_cgreenlet_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_mstate_global->__pyx_n_u_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __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_cgreenlet.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_11lambda5, 0, __pyx_mstate_global->__pyx_n_u_lambda, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely((PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Gevent_PyFrame_GetBack, __pyx_t_3) < 0))) __PYX_ERR(0, 61, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0062:

     0063:

    +0064: if _PYPY:

      if (__pyx_v_6gevent_17_gevent_cgreenlet__PYPY) {
    /* … */
      }

    +0065:     import _continuation # pylint:disable=import-error

        __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_continuation, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_continuation, __pyx_t_3) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0066:     _continulet = _continuation.continulet

        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_continuation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_continulet); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_continulet_2, __pyx_t_5) < 0) __PYX_ERR(0, 66, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0067:

     0068:

     0069: class SpawnedLink(object):

     0070:     """

     0071:     A wrapper around link that calls it in another greenlet.

     0072:

     0073:     Can be called only from main loop.

     0074:     """

    +0075:     __slots__ = ['callback']

      __pyx_t_5 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 75, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink, __pyx_mstate_global->__pyx_n_u_slots, __pyx_t_5) < 0) __PYX_ERR(0, 75, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0076:

    +0077:     def __init__(self, callback):

    /* Python wrapper */
    static int __pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_callback = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 77, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 77, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < 0) __PYX_ERR(0, 77, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 77, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 77, __pyx_L3_error)
        }
        __pyx_v_callback = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 77, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SpawnedLink.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink___init__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *)__pyx_v_self), __pyx_v_callback);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink___init__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *__pyx_v_self, PyObject *__pyx_v_callback) {
      int __pyx_r;
    /* … */
      /* 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_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SpawnedLink.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0078:         if not callable(callback):

      __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 78, __pyx_L1_error)
      __pyx_t_2 = (!__pyx_t_1);
      if (unlikely(__pyx_t_2)) {
    /* … */
      }

    +0079:             raise TypeError("Expected callable: %r" % (callback, ))

        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_5 = __pyx_builtin_TypeError;
        __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_callback), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_callable, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 79, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __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, 79, __pyx_L1_error)

    +0080:         self.callback = callback

      __Pyx_INCREF(__pyx_v_callback);
      __Pyx_GIVEREF(__pyx_v_callback);
      __Pyx_GOTREF(__pyx_v_self->callback);
      __Pyx_DECREF(__pyx_v_self->callback);
      __pyx_v_self->callback = __pyx_v_callback;

     0081:

    +0082:     def __call__(self, source):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_source = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 82, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 82, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 82, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, i); __PYX_ERR(0, 82, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 82, __pyx_L3_error)
        }
        __pyx_v_source = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 82, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_2__call__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *)__pyx_v_self), __pyx_v_source);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_2__call__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *__pyx_v_self, PyObject *__pyx_v_source) {
      PyGreenlet *__pyx_v_g = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_cgreenlet.SpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_g);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0083:         g = greenlet(self.callback, get_hub())

      __pyx_t_2 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet);
      __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet);
      __pyx_t_4 = ((PyObject *)__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_noargs(0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_self->callback, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_1);
      }
      __pyx_v_g = ((PyGreenlet *)__pyx_t_1);
      __pyx_t_1 = 0;

    +0084:         g.switch(source)

      __pyx_t_3 = ((PyObject *)__pyx_v_g);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_source};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_switch, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0085:

    +0086:     def __hash__(self):

    /* Python wrapper */
    static Py_hash_t __pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_5__hash__(PyObject *__pyx_v_self); /*proto*/
    static Py_hash_t __pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_5__hash__(PyObject *__pyx_v_self) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      Py_hash_t __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_4__hash__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *)__pyx_v_self));

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

    static Py_hash_t __pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_4__hash__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *__pyx_v_self) {
      Py_hash_t __pyx_r;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SpawnedLink.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0087:         return hash(self.callback)

      __pyx_t_1 = __pyx_v_self->callback;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 87, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      goto __pyx_L0;

     0088:

    +0089:     def __eq__(self, other):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_6__eq__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *)__pyx_v_self), ((PyObject *)__pyx_v_other));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_6__eq__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *__pyx_v_self, PyObject *__pyx_v_other) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SpawnedLink.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0090:         return self.callback == getattr(other, 'callback', other)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_other, __pyx_mstate_global->__pyx_n_u_callback, __pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->callback, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0091:

    +0092:     def __str__(self):

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_8__str__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SpawnedLink.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0093:         return str(self.callback)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_Unicode(__pyx_v_self->callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0094:

    +0095:     def __repr__(self):

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_10__repr__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SpawnedLink.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0096:         return repr(self.callback)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_v_self->callback;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __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;

     0097:

    +0098:     def __getattr__(self, item):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_11SpawnedLink_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_12__getattr__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *)__pyx_v_self), ((PyObject *)__pyx_v_item));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_11SpawnedLink_12__getattr__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_SpawnedLink *__pyx_v_self, PyObject *__pyx_v_item) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SpawnedLink.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0099:         assert item != 'callback'

      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(__pyx_assertions_enabled())) {
        __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_item, __pyx_mstate_global->__pyx_n_u_callback, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 99, __pyx_L1_error)
        if (unlikely(!__pyx_t_1)) {
          __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
          __PYX_ERR(0, 99, __pyx_L1_error)
        }
      }
      #else
      if ((1)); else __PYX_ERR(0, 99, __pyx_L1_error)
      #endif

    +0100:         return getattr(self.callback, item)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __pyx_v_self->callback;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_GetAttr(__pyx_t_2, __pyx_v_item); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

     0101:

     0102:

     0103: class SuccessSpawnedLink(SpawnedLink):

     0104:     """A wrapper around link that calls it in another greenlet only if source succeed.

     0105:

     0106:     Can be called only from main loop.

     0107:     """

    +0108:     __slots__ = []

      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink, __pyx_mstate_global->__pyx_n_u_slots, __pyx_t_5) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0109:

    +0110:     def __call__(self, source):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_18SuccessSpawnedLink_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_18SuccessSpawnedLink_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_source = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 110, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 110, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 110, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, i); __PYX_ERR(0, 110, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 110, __pyx_L3_error)
        }
        __pyx_v_source = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 110, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.SuccessSpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_18SuccessSpawnedLink___call__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink *)__pyx_v_self), __pyx_v_source);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_18SuccessSpawnedLink___call__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink *__pyx_v_self, PyObject *__pyx_v_source) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_AddTraceback("gevent._gevent_cgreenlet.SuccessSpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0111:         if source.successful():

      __pyx_t_2 = __pyx_v_source;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_successful, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 111, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_4) {
    /* … */
      }

    +0112:             return SpawnedLink.__call__(self, source)

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_source};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_call, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

     0113:

     0114:

     0115: class FailureSpawnedLink(SpawnedLink):

     0116:     """A wrapper around link that calls it in another greenlet only if source failed.

     0117:

     0118:     Can be called only from main loop.

     0119:     """

    +0120:     __slots__ = []

      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink, __pyx_mstate_global->__pyx_n_u_slots, __pyx_t_5) < 0) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0121:

    +0122:     def __call__(self, source):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_18FailureSpawnedLink_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_18FailureSpawnedLink_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_source = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_source,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 122, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 122, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__call__", 0) < 0) __PYX_ERR(0, 122, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, i); __PYX_ERR(0, 122, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 122, __pyx_L3_error)
        }
        __pyx_v_source = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 122, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.FailureSpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_18FailureSpawnedLink___call__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_FailureSpawnedLink *)__pyx_v_self), __pyx_v_source);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_18FailureSpawnedLink___call__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_FailureSpawnedLink *__pyx_v_self, PyObject *__pyx_v_source) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_AddTraceback("gevent._gevent_cgreenlet.FailureSpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0123:         if not source.successful():

      __pyx_t_2 = __pyx_v_source;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_successful, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 123, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = (!__pyx_t_4);
      if (__pyx_t_5) {
    /* … */
      }

    +0124:             return SpawnedLink.__call__(self, source)

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_3 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_source};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_call, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        goto __pyx_L0;

     0125:

     0126: class _Frame(object):

     0127:

    +0128:     __slots__ = ('f_code', 'f_lineno', 'f_back')

      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__Frame, __pyx_mstate_global->__pyx_n_u_slots, __pyx_mstate_global->__pyx_tuple[1]) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
    /* … */
      __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_n_u_f_code, __pyx_mstate_global->__pyx_n_u_f_lineno, __pyx_mstate_global->__pyx_n_u_f_back); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 128, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

     0129:

    +0130:     def __init__(self):

    /* Python wrapper */
    static int __pyx_pw_6gevent_17_gevent_cgreenlet_6_Frame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_17_gevent_cgreenlet_6_Frame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_6_Frame___init__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *)__pyx_v_self));

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

    static int __pyx_pf_6gevent_17_gevent_cgreenlet_6_Frame___init__(struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *__pyx_v_self) {
      int __pyx_r;
    /* … */
      /* function exit code */
      __pyx_r = 0;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0131:         self.f_code = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->f_code);
      __Pyx_DECREF(__pyx_v_self->f_code);
      __pyx_v_self->f_code = ((__pyx_t_6gevent_17_gevent_cgreenlet_CodeType)Py_None);

    +0132:         self.f_back = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF((PyObject *)__pyx_v_self->f_back);
      __Pyx_DECREF((PyObject *)__pyx_v_self->f_back);
      __pyx_v_self->f_back = ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *)Py_None);

    +0133:         self.f_lineno = 0

      __pyx_v_self->f_lineno = 0;

     0134:

    +0135:     @property

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_6_Frame_9f_globals___get__(CYTHON_UNUSED struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0136:     def f_globals(self):

    +0137:         return None

      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

     0138:

     0139:

    +0140: def _extract_stack(limit):

    static struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *__pyx_f_6gevent_17_gevent_cgreenlet__extract_stack(int __pyx_v_limit) {
      struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *__pyx_v_newest_Frame = 0;
      struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *__pyx_v_newer_Frame = 0;
      struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *__pyx_v_older_Frame = 0;
      PyObject *__pyx_v_frame = NULL;
      struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet._extract_stack", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_newest_Frame);
      __Pyx_XDECREF((PyObject *)__pyx_v_newer_Frame);
      __Pyx_XDECREF((PyObject *)__pyx_v_older_Frame);
      __Pyx_XDECREF(__pyx_v_frame);
      __Pyx_XGIVEREF((PyObject *)__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0141:     try:

      {
        /*try:*/ {
    /* … */
        }
        __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;
    /* … */
        __pyx_L5_except_error:;
        __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:;
      }

    +0142:         frame = sys_getframe()

          __pyx_t_5 = NULL;
          __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_getframe);
          __pyx_t_6 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_getframe;
          __pyx_t_7 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_5);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_7 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __pyx_v_frame = __pyx_t_4;
          __pyx_t_4 = 0;

    +0143:     except ValueError:

        __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
        if (__pyx_t_8) {
          __Pyx_AddTraceback("gevent._gevent_cgreenlet._extract_stack", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 143, __pyx_L5_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_5);

     0144:         # In certain embedded cases that directly use the Python C api

     0145:         # to call Greenlet.spawn (e.g., uwsgi) this can raise

     0146:         # `ValueError: call stack is not deep enough`. This is because

     0147:         # the Cython stack frames for Greenlet.spawn ->

     0148:         # Greenlet.__init__ -> _extract_stack are all on the C level,

     0149:         # not the Python level.

     0150:         # See https://github.com/gevent/gevent/issues/1212

    +0151:         frame = None

          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_frame, Py_None);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L4_exception_handled;
        }
        goto __pyx_L5_except_error;

     0152:

    +0153:     newest_Frame = None

      __Pyx_INCREF(Py_None);
      __pyx_v_newest_Frame = ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *)Py_None);

    +0154:     newer_Frame = None

      __Pyx_INCREF(Py_None);
      __pyx_v_newer_Frame = ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *)Py_None);

     0155:

    +0156:     while limit and frame is not None:

      while (1) {
        __pyx_t_10 = (__pyx_v_limit != 0);
        if (__pyx_t_10) {
        } else {
          __pyx_t_9 = __pyx_t_10;
          goto __pyx_L13_bool_binop_done;
        }
        __pyx_t_10 = (__pyx_v_frame != Py_None);
        __pyx_t_9 = __pyx_t_10;
        __pyx_L13_bool_binop_done:;
        if (!__pyx_t_9) break;

    +0157:         limit -= 1

        __pyx_v_limit = (__pyx_v_limit - 1);

    +0158:         older_Frame = _Frame()

        __pyx_t_6 = NULL;
        __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__Frame);
        __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__Frame);
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error)
          __Pyx_GOTREF((PyObject *)__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_v_older_Frame, ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *)__pyx_t_5));
        __pyx_t_5 = 0;

     0159:         # Arguments are always passed to the constructor as Python objects,

     0160:         # meaning we wind up boxing the f_lineno just to unbox it if we pass it.

     0161:         # It's faster to simply assign once the object is created.

    +0162:         older_Frame.f_code = Gevent_PyFrame_GetCode(frame)  # pylint:disable=undefined-variable

        __pyx_t_5 = ((PyObject *)Gevent_PyFrame_GetCode(((__pyx_t_6gevent_17_gevent_cgreenlet_FrameType)__pyx_v_frame))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 162, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        __Pyx_GOTREF(__pyx_v_older_Frame->f_code);
        __Pyx_DECREF(__pyx_v_older_Frame->f_code);
        __pyx_v_older_Frame->f_code = ((__pyx_t_6gevent_17_gevent_cgreenlet_CodeType)__pyx_t_5);
        __pyx_t_5 = 0;

    +0163:         older_Frame.f_lineno = Gevent_PyFrame_GetLineNumber(frame) # pylint:disable=undefined-variable

        __pyx_v_older_Frame->f_lineno = Gevent_PyFrame_GetLineNumber(((__pyx_t_6gevent_17_gevent_cgreenlet_FrameType)__pyx_v_frame));

    +0164:         if newer_Frame is not None:

        __pyx_t_9 = (((PyObject *)__pyx_v_newer_Frame) != Py_None);
        if (__pyx_t_9) {
    /* … */
        }

    +0165:             newer_Frame.f_back = older_Frame

          __Pyx_INCREF((PyObject *)__pyx_v_older_Frame);
          __Pyx_GIVEREF((PyObject *)__pyx_v_older_Frame);
          __Pyx_GOTREF((PyObject *)__pyx_v_newer_Frame->f_back);
          __Pyx_DECREF((PyObject *)__pyx_v_newer_Frame->f_back);
          __pyx_v_newer_Frame->f_back = __pyx_v_older_Frame;

    +0166:         newer_Frame = older_Frame

        __Pyx_INCREF((PyObject *)__pyx_v_older_Frame);
        __Pyx_DECREF_SET(__pyx_v_newer_Frame, __pyx_v_older_Frame);

    +0167:         if newest_Frame is None:

        __pyx_t_9 = (((PyObject *)__pyx_v_newest_Frame) == Py_None);
        if (__pyx_t_9) {
    /* … */
        }

    +0168:             newest_Frame = newer_Frame

          __Pyx_INCREF((PyObject *)__pyx_v_newer_Frame);
          __Pyx_DECREF_SET(__pyx_v_newest_Frame, __pyx_v_newer_Frame);

     0169:

    +0170:         frame = Gevent_PyFrame_GetBack(frame) # pylint:disable=undefined-variable

        __pyx_t_5 = Gevent_PyFrame_GetBack(((__pyx_t_6gevent_17_gevent_cgreenlet_FrameType)__pyx_v_frame)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_5);
        __pyx_t_5 = 0;
      }

     0171:

    +0172:     return newest_Frame

      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_newest_Frame);
      __pyx_r = __pyx_v_newest_Frame;
      goto __pyx_L0;

     0173:

     0174:

    +0175: _greenlet__init__ = greenlet.__init__

      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet), __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet__greenlet__init__);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet__greenlet__init__, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_5 = 0;

     0176:

    +0177: class Greenlet(greenlet):

    struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet {
      int (*has_links)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, int __pyx_skip_dispatch);
      PyObject *(*join)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_17_gevent_cgreenlet_8Greenlet_join *__pyx_optional_args);
      PyObject *(*kill)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_17_gevent_cgreenlet_8Greenlet_kill *__pyx_optional_args);
      int (*ready)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, int __pyx_skip_dispatch);
      int (*successful)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, int __pyx_skip_dispatch);
      PyObject *(*rawlink)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, PyObject *, int __pyx_skip_dispatch);
      PyObject *(*_formatinfo)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, int __pyx_skip_dispatch);
      int (*_maybe_kill_before_start)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, PyObject *, int __pyx_skip_dispatch);
      PyObject *(*_get_minimal_ident)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
      int (*_Greenlet__started_but_aborted)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
      int (*_Greenlet__start_cancelled_by_kill)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
      int (*_Greenlet__start_pending)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
      int (*_Greenlet__never_started_or_killed)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
      int (*_Greenlet__start_completed)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
      PyObject *(*_Greenlet__handle_death_before_start)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, PyObject *);
      void (*_Greenlet__free)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
      PyObject *(*_Greenlet__cancel_start)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
      PyObject *(*_Greenlet__report_result)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, PyObject *);
      PyObject *(*_Greenlet__report_error)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, PyObject *);
      PyObject *(*_notify_links)(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_vtabptr_6gevent_17_gevent_cgreenlet_Greenlet;
    static CYTHON_INLINE void __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *);
    static CYTHON_INLINE PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_result(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, PyObject *);
    static CYTHON_INLINE PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_error(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *, PyObject *);

     0178:     """

     0179:     A light-weight cooperatively-scheduled execution unit.

     0180:     """

     0181:     # pylint:disable=too-many-public-methods,too-many-instance-attributes

     0182:

    +0183:     spawning_stack_limit = 10

      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_spawning_stack_limit, __pyx_mstate_global->__pyx_int_10) < 0) __PYX_ERR(0, 183, __pyx_L1_error)

     0184:

     0185:     # pylint:disable=keyword-arg-before-vararg,super-init-not-called

    +0186:     def __init__(self, run=None, *args, **kwargs):

    /* Python wrapper */
    static int __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet___init__, "\n        :param args: The arguments passed to the ``run`` function.\n        :param kwargs: The keyword arguments passed to the ``run`` function.\n        :keyword callable run: The callable object to run. If not given, this object's\n            `_run` method will be invoked (typically defined by subclasses).\n\n        .. versionchanged:: 1.1b1\n            The ``run`` argument to the constructor is now verified to be a callable\n            object. Previously, passing a non-callable object would fail after the greenlet\n            was spawned.\n\n        .. versionchanged:: 1.3b1\n           The ``GEVENT_TRACK_GREENLET_TREE`` configuration value may be set to\n           a false value to disable ``spawn_tree_locals``, ``spawning_greenlet``,\n           and ``spawning_stack``. The first two will be None in that case, and the\n           latter will be empty.\n\n        .. versionchanged:: 1.5\n           Greenlet objects are now more careful to verify that their ``parent`` is really\n           a gevent hub, raising a ``TypeError`` earlier instead of an ``AttributeError`` later.\n\n        .. versionchanged:: 20.12.1\n           Greenlet objects now function as context managers. Exiting the ``with`` suite\n           ensures that the greenlet has completed by :meth:`joining <join>`\n           the greenlet (blocking, with\n           no timeout). If the body of the suite raises an exception, the greenlet is\n           :meth:`killed <kill>` with the default arguments and not joined in that case.\n        ");
    #if CYTHON_UPDATE_DESCRIPTOR_DOC
    struct wrapperbase __pyx_wrapperbase_6gevent_17_gevent_cgreenlet_8Greenlet___init__;
    #endif
    static int __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_run = 0;
      PyObject *__pyx_v_args = 0;
      PyObject *__pyx_v_kwargs = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
      __Pyx_GOTREF(__pyx_v_kwargs);
      __pyx_v_args = __Pyx_ArgsSlice_VARARGS(__pyx_args, 1, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
        __Pyx_RefNannyFinishContext();
        return -1;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_run,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 186, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            default:
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 186, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__init__", 1) < 0) __PYX_ERR(0, 186, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            default:
            case  1:
            values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 186, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_run = values[0];
      }
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return -1;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet___init__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_run, __pyx_v_args, __pyx_v_kwargs);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_args);
      __Pyx_DECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static int __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet___init__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_run, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
      PyGreenlet *__pyx_v_spawner = NULL;
      int __pyx_r;
    /* … */
      /* 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_cgreenlet.Greenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = -1;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_spawner);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0187:         """

     0188:         :param args: The arguments passed to the ``run`` function.

     0189:         :param kwargs: The keyword arguments passed to the ``run`` function.

     0190:         :keyword callable run: The callable object to run. If not given, this object's

     0191:             `_run` method will be invoked (typically defined by subclasses).

     0192:

     0193:         .. versionchanged:: 1.1b1

     0194:             The ``run`` argument to the constructor is now verified to be a callable

     0195:             object. Previously, passing a non-callable object would fail after the greenlet

     0196:             was spawned.

     0197:

     0198:         .. versionchanged:: 1.3b1

     0199:            The ``GEVENT_TRACK_GREENLET_TREE`` configuration value may be set to

     0200:            a false value to disable ``spawn_tree_locals``, ``spawning_greenlet``,

     0201:            and ``spawning_stack``. The first two will be None in that case, and the

     0202:            latter will be empty.

     0203:

     0204:         .. versionchanged:: 1.5

     0205:            Greenlet objects are now more careful to verify that their ``parent`` is really

     0206:            a gevent hub, raising a ``TypeError`` earlier instead of an ``AttributeError`` later.

     0207:

     0208:         .. versionchanged:: 20.12.1

     0209:            Greenlet objects now function as context managers. Exiting the ``with`` suite

     0210:            ensures that the greenlet has completed by :meth:`joining <join>`

     0211:            the greenlet (blocking, with

     0212:            no timeout). If the body of the suite raises an exception, the greenlet is

     0213:            :meth:`killed <kill>` with the default arguments and not joined in that case.

     0214:         """

     0215:         # The attributes are documented in the .rst file

     0216:

     0217:         # greenlet.greenlet(run=None, parent=None)

     0218:         # Calling it with both positional arguments instead of a keyword

     0219:         # argument (parent=get_hub()) speeds up creation of this object ~30%:

     0220:         # python -m timeit -s 'import gevent' 'gevent.Greenlet()'

     0221:         # Python 3.5: 2.70usec with keywords vs 1.94usec with positional

     0222:         # Python 3.4: 2.32usec with keywords vs 1.74usec with positional

     0223:         # Python 3.3: 2.55usec with keywords vs 1.92usec with positional

     0224:         # Python 2.7: 1.73usec with keywords vs 1.40usec with positional

     0225:

     0226:         # Timings taken Feb 21 2018 prior to integration of #755

     0227:         # python -m perf timeit -s 'import gevent' 'gevent.Greenlet()'

     0228:         # 3.6.4       : Mean +- std dev: 1.08 us +- 0.05 us

     0229:         # 2.7.14      : Mean +- std dev: 1.44 us +- 0.06 us

     0230:         # PyPy2 5.10.0: Mean +- std dev: 2.14 ns +- 0.08 ns

     0231:

     0232:         # After the integration of spawning_stack, spawning_greenlet,

     0233:         # and spawn_tree_locals on that same date:

     0234:         # 3.6.4       : Mean +- std dev: 8.92 us +- 0.36 us ->  8.2x

     0235:         # 2.7.14      : Mean +- std dev: 14.8 us +- 0.5 us  -> 10.2x

     0236:         # PyPy2 5.10.0: Mean +- std dev: 3.24 us +- 0.17 us ->  1.5x

     0237:

     0238:         # Compiling with Cython gets us to these numbers:

     0239:         # 3.6.4        : Mean +- std dev: 3.63 us +- 0.14 us

     0240:         # 2.7.14       : Mean +- std dev: 3.37 us +- 0.20 us

     0241:         # PyPy2 5.10.0 : Mean +- std dev: 4.44 us +- 0.28 us

     0242:

     0243:         # Switching to reified frames and some more tuning gets us here:

     0244:         # 3.7.2        : Mean +- std dev: 2.53 us +- 0.15 us

     0245:         # 2.7.16       : Mean +- std dev: 2.35 us +- 0.12 us

     0246:         # PyPy2 7.1    : Mean +- std dev: 11.6 us +- 0.4 us

     0247:

     0248:         # Compared to the released 1.4 (tested at the same time):

     0249:         # 3.7.2        : Mean +- std dev: 3.21 us +- 0.32 us

     0250:         # 2.7.16       : Mean +- std dev: 3.11 us +- 0.19 us

     0251:         # PyPy2 7.1    : Mean +- std dev: 12.3 us +- 0.8 us

     0252:

    +0253:         _greenlet__init__(self, None, get_hub())

      __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet__greenlet__init__);
      __pyx_t_3 = __pyx_v_6gevent_17_gevent_cgreenlet__greenlet__init__;
      __pyx_t_4 = ((PyObject *)__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_noargs(0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_5 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_2, ((PyObject *)__pyx_v_self), Py_None, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0254:

    +0255:         if run is not None:

      __pyx_t_6 = (__pyx_v_run != Py_None);
      if (__pyx_t_6) {
    /* … */
      }

    +0256:             self._run = run

        if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_run_2, __pyx_v_run) < 0) __PYX_ERR(0, 256, __pyx_L1_error)

     0257:

     0258:         # If they didn't pass a callable at all, then they must

     0259:         # already have one. Note that subclassing to override the run() method

     0260:         # itself has never been documented or supported.

    +0261:         if not callable(self._run):

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_run_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyCallable_Check(__pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = (!__pyx_t_6);
      if (unlikely(__pyx_t_7)) {
    /* … */
      }

    +0262:             raise TypeError("The run argument or self._run must be callable")

        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_4 = __pyx_builtin_TypeError;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_The_run_argument_or_self__run_mu};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __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, 262, __pyx_L1_error)

     0263:

    +0264:         self.args = args

      __Pyx_INCREF(__pyx_v_args);
      __Pyx_GIVEREF(__pyx_v_args);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = __pyx_v_args;

    +0265:         self.kwargs = kwargs

      __Pyx_INCREF(__pyx_v_kwargs);
      __Pyx_GIVEREF(__pyx_v_kwargs);
      __Pyx_GOTREF(__pyx_v_self->kwargs);
      __Pyx_DECREF(__pyx_v_self->kwargs);
      __pyx_v_self->kwargs = __pyx_v_kwargs;

    +0266:         self.value = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->value);
      __Pyx_DECREF(__pyx_v_self->value);
      __pyx_v_self->value = Py_None;

     0267:

     0268:         #: An event, such as a timer or a callback that fires. It is established in

     0269:         #: start() and start_later() as those two objects, respectively.

     0270:         #: Once this becomes non-None, the Greenlet cannot be started again. Conversely,

     0271:         #: kill() and throw() check for non-None to determine if this object has ever been

     0272:         #: scheduled for starting. A placeholder _cancelled_start_event is assigned by them to prevent

     0273:         #: the greenlet from being started in the future, if necessary.

     0274:         #: In the usual case, this transitions as follows: None -> event -> _start_completed_event.

     0275:         #: A value of None means we've never been started.

    +0276:         self._start_event = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->_start_event);
      __Pyx_DECREF(__pyx_v_self->_start_event);
      __pyx_v_self->_start_event = Py_None;

     0277:

    +0278:         self._notifier = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->_notifier);
      __Pyx_DECREF(__pyx_v_self->_notifier);
      __pyx_v_self->_notifier = Py_None;

    +0279:         self._formatted_info = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->_formatted_info);
      __Pyx_DECREF(__pyx_v_self->_formatted_info);
      __pyx_v_self->_formatted_info = ((PyObject*)Py_None);

    +0280:         self._links = []

      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_links);
      __Pyx_DECREF(__pyx_v_self->_links);
      __pyx_v_self->_links = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +0281:         self._ident = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->_ident);
      __Pyx_DECREF(__pyx_v_self->_ident);
      __pyx_v_self->_ident = Py_None;

     0282:

     0283:         # Initial state: None.

     0284:         # Completed successfully: (None, None, None)

     0285:         # Failed with exception: (t, v, dump_traceback(tb)))

    +0286:         self._exc_info = None

      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      __Pyx_GOTREF(__pyx_v_self->_exc_info);
      __Pyx_DECREF(__pyx_v_self->_exc_info);
      __pyx_v_self->_exc_info = ((PyObject*)Py_None);

     0287:

    +0288:         if GEVENT_CONFIG.track_greenlet_tree:

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_6gevent_17_gevent_cgreenlet_GEVENT_CONFIG, __pyx_mstate_global->__pyx_n_u_track_greenlet_tree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 288, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_7) {
    /* … */
        goto __pyx_L5;
      }

    +0289:             spawner = getcurrent() # pylint:disable=undefined-variable

        __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_getcurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_spawner = ((PyGreenlet *)__pyx_t_1);
        __pyx_t_1 = 0;

    +0290:             self.spawning_greenlet = wref(spawner)

        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_wref);
        __pyx_t_3 = __pyx_v_6gevent_17_gevent_cgreenlet_wref;
        __pyx_t_5 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
          __pyx_t_5 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_spawner)};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __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, 290, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_v_self->spawning_greenlet);
        __Pyx_DECREF(__pyx_v_self->spawning_greenlet);
        __pyx_v_self->spawning_greenlet = __pyx_t_1;
        __pyx_t_1 = 0;

    +0291:             try:

        {
          /*try:*/ {
    /* … */
          }
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L11_try_end;
          __pyx_L6_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;
    /* … */
          __pyx_L8_except_error:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          goto __pyx_L1_error;
          __pyx_L7_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          __pyx_L11_try_end:;
        }

    +0292:                 self.spawn_tree_locals = spawner.spawn_tree_locals

            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_spawner), __pyx_mstate_global->__pyx_n_u_spawn_tree_locals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 292, __pyx_L6_error)
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GOTREF(__pyx_v_self->spawn_tree_locals);
            __Pyx_DECREF(__pyx_v_self->spawn_tree_locals);
            __pyx_v_self->spawn_tree_locals = ((PyObject*)__pyx_t_1);
            __pyx_t_1 = 0;

    +0293:             except AttributeError:

          __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
          if (__pyx_t_11) {
            __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 293, __pyx_L8_except_error)
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_4);

    +0294:                 self.spawn_tree_locals = {}

            __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_GOTREF(__pyx_v_self->spawn_tree_locals);
            __Pyx_DECREF(__pyx_v_self->spawn_tree_locals);
            __pyx_v_self->spawn_tree_locals = ((PyObject*)__pyx_t_2);
            __pyx_t_2 = 0;

    +0295:                 if get_generic_parent(spawner) is not None: # pylint:disable=undefined-variable

            __pyx_t_2 = __pyx_f_6gevent_17_gevent_cgreenlet_get_generic_parent(__pyx_v_spawner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 295, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_7 = (__pyx_t_2 != Py_None);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__pyx_t_7) {
    /* … */
            }
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            goto __pyx_L7_exception_handled;
          }
          goto __pyx_L8_except_error;

     0296:                     # The main greenlet has no parent.

     0297:                     # Its children get separate locals.

    +0298:                     spawner.spawn_tree_locals = self.spawn_tree_locals

              __pyx_t_2 = __pyx_v_self->spawn_tree_locals;
              __Pyx_INCREF(__pyx_t_2);
              if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_spawner), __pyx_mstate_global->__pyx_n_u_spawn_tree_locals, __pyx_t_2) < 0) __PYX_ERR(0, 298, __pyx_L8_except_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0299:

    +0300:             self.spawning_stack = _extract_stack(self.spawning_stack_limit)

        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_spawning_stack_limit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet__extract_stack(__pyx_t_11)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF((PyObject *)__pyx_v_self->spawning_stack);
        __Pyx_DECREF((PyObject *)__pyx_v_self->spawning_stack);
        __pyx_v_self->spawning_stack = ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *)__pyx_t_4);
        __pyx_t_4 = 0;

     0301:             # Don't copy the spawning greenlet's

     0302:             # '_spawning_stack_frames' into ours. That's somewhat

     0303:             # confusing, and, if we're not careful, a deep spawn tree

     0304:             # can lead to excessive memory usage (an infinite spawning

     0305:             # tree could lead to unbounded memory usage without care

     0306:             # --- see https://github.com/gevent/gevent/issues/1371)

     0307:             # The _spawning_stack_frames may be cleared out later if we access spawning_stack

     0308:         else:

     0309:             # None is the default for all of these in Cython, but we

     0310:             # need to declare them for pure-Python mode.

    +0311:             self.spawning_greenlet = None

      /*else*/ {
        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        __Pyx_GOTREF(__pyx_v_self->spawning_greenlet);
        __Pyx_DECREF(__pyx_v_self->spawning_greenlet);
        __pyx_v_self->spawning_greenlet = Py_None;

    +0312:             self.spawn_tree_locals = None

        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        __Pyx_GOTREF(__pyx_v_self->spawn_tree_locals);
        __Pyx_DECREF(__pyx_v_self->spawn_tree_locals);
        __pyx_v_self->spawn_tree_locals = ((PyObject*)Py_None);

    +0313:             self.spawning_stack = None

        __Pyx_INCREF(Py_None);
        __Pyx_GIVEREF(Py_None);
        __Pyx_GOTREF((PyObject *)__pyx_v_self->spawning_stack);
        __Pyx_DECREF((PyObject *)__pyx_v_self->spawning_stack);
        __pyx_v_self->spawning_stack = ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *)Py_None);
      }
      __pyx_L5:;

     0314:

    +0315:     def _get_minimal_ident(self):

    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__get_minimal_ident(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      struct __pyx_obj_6gevent_15_gevent_c_ident_IdentRegistry *__pyx_v_reg = 0;
      struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_hub = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._get_minimal_ident", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_reg);
      __Pyx_XDECREF((PyObject *)__pyx_v_hub);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0316:         # Helper function for cython, to allow typing `reg` and making a

     0317:         # C call to get_ident.

     0318:

     0319:         # If we're being accessed from a hub different than the one running

     0320:         # us, aka get_hub() is not self.parent, then calling hub.ident_registry.get_ident()

     0321:         # may be quietly broken: it's not thread safe.

     0322:         # If our parent is no longer the hub for whatever reason, this will raise a

     0323:         # AttributeError or TypeError.

    +0324:         hub = get_my_hub(self) # pylint:disable=undefined-variable

      __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_hub = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_1);
      __pyx_t_1 = 0;

     0325:

    +0326:         reg = hub.ident_registry

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_hub), __pyx_mstate_global->__pyx_n_u_ident_registry); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_6gevent_15_gevent_c_ident_IdentRegistry))))) __PYX_ERR(0, 326, __pyx_L1_error)
      __pyx_v_reg = ((struct __pyx_obj_6gevent_15_gevent_c_ident_IdentRegistry *)__pyx_t_1);
      __pyx_t_1 = 0;

    +0327:         return reg.get_ident(self)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_15_gevent_c_ident_IdentRegistry *)__pyx_v_reg->__pyx_vtab)->get_ident(__pyx_v_reg, ((PyObject *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0328:

    +0329:     @property

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_13minimal_ident___get__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.minimal_ident.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0330:     def minimal_ident(self):

     0331:         """

     0332:         A small, unique non-negative integer that identifies this object.

     0333:

     0334:         This is similar to :attr:`threading.Thread.ident` (and `id`)

     0335:         in that as long as this object is alive, no other greenlet *in

     0336:         this hub* will have the same id, but it makes a stronger

     0337:         guarantee that the assigned values will be small and

     0338:         sequential. Sometime after this object has died, the value

     0339:         will be available for reuse.

     0340:

     0341:         To get ids that are unique across all hubs, combine this with

     0342:         the hub's (``self.parent``) ``minimal_ident``.

     0343:

     0344:         Accessing this property from threads other than the thread running

     0345:         this greenlet is not defined.

     0346:

     0347:         .. versionadded:: 1.3a2

     0348:

     0349:         """

     0350:         # Not @Lazy, implemented manually because _ident is in the structure

     0351:         # of the greenlet for fast access

    +0352:         if self._ident is None:

      __pyx_t_1 = (__pyx_v_self->_ident == Py_None);
      if (__pyx_t_1) {
    /* … */
      }

    +0353:             self._ident = self._get_minimal_ident()

        __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_get_minimal_ident(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_ident);
        __Pyx_DECREF(__pyx_v_self->_ident);
        __pyx_v_self->_ident = __pyx_t_2;
        __pyx_t_2 = 0;

    +0354:         return self._ident

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_self->_ident);
      __pyx_r = __pyx_v_self->_ident;
      goto __pyx_L0;

     0355:

    +0356:     @readproperty

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_3name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_2name, "Greenlet.name(self)\n\nThe greenlet name. By default, a unique name is constructed using\nthe :attr:`minimal_ident`. You can assign a string to this\nvalue to change it. It is shown in the `repr` of this object if it\nhas been assigned to or if the `minimal_ident` has already been generated.\n\n.. versionadded:: 1.3a2\n.. versionchanged:: 1.4\n   Stop showing generated names in the `repr` when the ``minimal_ident``\n   hasn't been requested. This reduces overhead and may be less confusing,\n   since ``minimal_ident`` can get reused.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_3name = {"name", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_3name, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_2name};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_3name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("name (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_2name(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_2name(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.name", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_3name, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_name, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_t_5) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_3 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_readproperty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetNameInClass(__pyx_t_7, (PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_t_5) < 0) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0357:     def name(self):

     0358:         """

     0359:         The greenlet name. By default, a unique name is constructed using

     0360:         the :attr:`minimal_ident`. You can assign a string to this

     0361:         value to change it. It is shown in the `repr` of this object if it

     0362:         has been assigned to or if the `minimal_ident` has already been generated.

     0363:

     0364:         .. versionadded:: 1.3a2

     0365:         .. versionchanged:: 1.4

     0366:            Stop showing generated names in the `repr` when the ``minimal_ident``

     0367:            hasn't been requested. This reduces overhead and may be less confusing,

     0368:            since ``minimal_ident`` can get reused.

     0369:         """

    +0370:         return 'Greenlet-%d' % (self.minimal_ident,)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_minimal_ident); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_1), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Greenlet, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __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;

     0371:

    +0372:     def _raise_exception(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_5_raise_exception(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_4_raise_exception, "Greenlet._raise_exception(self)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_5_raise_exception = {"_raise_exception", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_5_raise_exception, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_4_raise_exception};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_5_raise_exception(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_raise_exception (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_4_raise_exception(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_4_raise_exception(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_AddTraceback("gevent._gevent_cgreenlet.Greenlet._raise_exception", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_5_raise_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet__raise_exception, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_raise_exception, __pyx_t_5) < 0) __PYX_ERR(0, 372, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +0373:         reraise(*self.exc_info)

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_exc_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_6gevent_17_gevent_cgreenlet_reraise, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __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;

     0374:

    +0375:     @property

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_4loop___get__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_hub = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.loop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_hub);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0376:     def loop(self):

     0377:         # needed by killall

    +0378:         hub = get_my_hub(self) # pylint:disable=undefined-variable

      __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_hub = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_1);
      __pyx_t_1 = 0;

    +0379:         return hub.loop

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_hub->loop);
      __pyx_r = __pyx_v_hub->loop;
      goto __pyx_L0;

     0380:

    +0381:     def __bool__(self):

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

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

    static int __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_6__bool__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      int __pyx_r;
    /* … */
      /* function exit code */
      __pyx_L0:;
      return __pyx_r;
    }

    +0382:         return self._start_event is not None and self._exc_info is None

      __pyx_t_2 = (__pyx_v_self->_start_event != Py_None);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_2 = (__pyx_v_self->_exc_info == ((PyObject*)Py_None));
      __pyx_t_1 = __pyx_t_2;
      __pyx_L3_bool_binop_done:;
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0383:

     0384:     ### Lifecycle

     0385:

    +0386:     if _PYPY:

      if (__pyx_v_6gevent_17_gevent_cgreenlet__PYPY) {
    /* … */
        goto __pyx_L3;
      }

     0387:         # oops - pypy's .dead relies on __nonzero__ which we overriden above

     0388:         @property

     0389:         def dead(self):

     0390:             "Boolean indicating that the greenlet is dead and will not run again."

     0391:             # pylint:disable=no-member

     0392:             if self._greenlet__main:

     0393:                 return False

     0394:             if self.__start_cancelled_by_kill() or self.__started_but_aborted():

     0395:                 return True

     0396:

     0397:             return self._greenlet__started and not _continulet.is_pending(self)

     0398:     else:

    +0399:         @property

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_4dead___get__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.dead.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
      /*else*/ {
      }
      __pyx_L3:;

     0400:         def dead(self):

     0401:             """

     0402:             Boolean indicating that the greenlet is dead and will not run again.

     0403:

     0404:             This is true if:

     0405:

     0406:             1. We were never started, but were :meth:`killed <kill>`

     0407:                immediately after creation (not possible with :meth:`spawn`); OR

     0408:             2. We were started, but were killed before running; OR

     0409:             3. We have run and terminated (by raising an exception out of the

     0410:                started function or by reaching the end of the started function).

     0411:             """

    +0412:             return (

      __Pyx_XDECREF(__pyx_r);

    +0413:                 self.__start_cancelled_by_kill()

      __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__start_cancelled_by_kill(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 413, __pyx_L1_error)
      if (!__pyx_t_2) {
      } else {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L3_bool_binop_done;
      }

    +0414:                 or self.__started_but_aborted()

      __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__started_but_aborted(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 414, __pyx_L1_error)
      if (!__pyx_t_2) {
      } else {
        __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L3_bool_binop_done;
      }

    +0415:                 or greenlet.dead.__get__(self)

      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet), __pyx_mstate_global->__pyx_n_u_dead); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __pyx_t_5;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_1 = __pyx_t_3;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_L3_bool_binop_done:;
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0416:             )

     0417:

    +0418:     def __never_started_or_killed(self):

    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__never_started_or_killed(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      int __pyx_r;
    /* … */
      /* function exit code */
      __pyx_L0:;
      return __pyx_r;
    }

    +0419:         return self._start_event is None

      __pyx_t_1 = (__pyx_v_self->_start_event == Py_None);
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0420:

    +0421:     def __start_pending(self):

    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__start_pending(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      int __pyx_r;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._Greenlet__start_pending", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0422:         return (

    +0423:             self._start_event is not None

      __pyx_t_2 = (__pyx_v_self->_start_event != Py_None);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L3_bool_binop_done;
      }

    +0424:             and (self._start_event.pending or getattr(self._start_event, 'active', False))

      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_start_event, __pyx_mstate_global->__pyx_n_u_pending); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (!__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_3 = __pyx_v_self->_start_event;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_GetAttr3(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_active, Py_False); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 424, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __pyx_t_2;
      __pyx_L3_bool_binop_done:;
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0425:         )

     0426:

    +0427:     def __start_cancelled_by_kill(self):

    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__start_cancelled_by_kill(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      int __pyx_r;
    /* … */
      /* function exit code */
      __pyx_L0:;
      return __pyx_r;
    }

    +0428:         return self._start_event is _cancelled_start_event

      __pyx_t_1 = (__pyx_v_self->_start_event == ((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__cancelled_start_event));
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0429:

    +0430:     def __start_completed(self):

    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__start_completed(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      int __pyx_r;
    /* … */
      /* function exit code */
      __pyx_L0:;
      return __pyx_r;
    }

    +0431:         return self._start_event is _start_completed_event

      __pyx_t_1 = (__pyx_v_self->_start_event == ((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__start_completed_event));
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0432:

    +0433:     def __started_but_aborted(self):

    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__started_but_aborted(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      int __pyx_r;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._Greenlet__started_but_aborted", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      return __pyx_r;
    }

     0434:         return (

    +0435:             not self.__never_started_or_killed() # we have been started or killed

      __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__never_started_or_killed(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 435, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_2);
      if (__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L3_bool_binop_done;
      }

    +0436:             and not self.__start_cancelled_by_kill() # we weren't killed, so we must have been started

      __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__start_cancelled_by_kill(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
      __pyx_t_2 = (!__pyx_t_3);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L3_bool_binop_done;
      }

    +0437:             and not self.__start_completed() # the start never completed

      __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__start_completed(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 437, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_2);
      if (__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L3_bool_binop_done;
      }

    +0438:             and not self.__start_pending() # and we're not pending, so we must have been aborted

      __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__start_pending(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 438, __pyx_L1_error)
      __pyx_t_2 = (!__pyx_t_3);
      __pyx_t_1 = __pyx_t_2;
      __pyx_L3_bool_binop_done:;
      __pyx_r = __pyx_t_1;
      goto __pyx_L0;

     0439:         )

     0440:

    +0441:     def __cancel_start(self):

    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__cancel_start(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_AddTraceback("gevent._gevent_cgreenlet.Greenlet._Greenlet__cancel_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0442:         if self._start_event is None:

      __pyx_t_1 = (__pyx_v_self->_start_event == Py_None);
      if (__pyx_t_1) {
    /* … */
      }

     0443:             # prevent self from ever being started in the future

    +0444:             self._start_event = _cancelled_start_event

        __Pyx_INCREF((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__cancelled_start_event);
        __Pyx_GIVEREF((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__cancelled_start_event);
        __Pyx_GOTREF(__pyx_v_self->_start_event);
        __Pyx_DECREF(__pyx_v_self->_start_event);
        __pyx_v_self->_start_event = ((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__cancelled_start_event);

     0445:         # cancel any pending start event

     0446:         # NOTE: If this was a real pending start event, this will leave a

     0447:         # "dangling" callback/timer object in the hub.loop.callbacks list;

     0448:         # depending on where we are in the event loop, it may even be in a local

     0449:         # variable copy of that list (in _run_callbacks). This isn't a problem,

     0450:         # except for the leak-tests.

    +0451:         self._start_event.stop()

      __pyx_t_3 = __pyx_v_self->_start_event;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_stop, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0452:         self._start_event.close()

      __pyx_t_3 = __pyx_v_self->_start_event;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0453:

    +0454:     def __handle_death_before_start(self, args):

    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__handle_death_before_start(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_args) {
      PyObject *__pyx_v_arg = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_INCREF(__pyx_v_args);
    /* … */
      /* 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_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._Greenlet__handle_death_before_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_arg);
      __Pyx_XDECREF(__pyx_v_args);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0455:         # args is (t, v, tb) or simply t or v.

     0456:         # The last two cases are transformed into (t, v, None);

     0457:         # if the single argument is an exception type, a new instance

     0458:         # is created; if the single argument is not an exception type and also

     0459:         # not an exception, it is wrapped in a BaseException (this is not

     0460:         # documented, but should result in better behaviour in the event of a

     0461:         # user error---instead of silently printing something to stderr, we still

     0462:         # kill the greenlet).

    +0463:         if self._exc_info is None and self.dead:

      __pyx_t_2 = (__pyx_v_self->_exc_info == ((PyObject*)Py_None));
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dead); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 463, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_2;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {
    /* … */
      }

     0464:             # the greenlet was never switched to before and it will

     0465:             # never be; _report_error was not called, the result was

     0466:             # not set, and the links weren't notified. Let's do it

     0467:             # here.

     0468:             #

     0469:             # checking that self.dead is true is essential, because

     0470:             # throw() does not necessarily kill the greenlet (if the

     0471:             # exception raised by throw() is caught somewhere inside

     0472:             # the greenlet).

    +0473:             if len(args) == 1:

        if (unlikely(__pyx_v_args == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(0, 473, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 473, __pyx_L1_error)
        __pyx_t_1 = (__pyx_t_4 == 1);
        if (__pyx_t_1) {
    /* … */
          goto __pyx_L6;
        }

    +0474:                 arg = args[0]

          if (unlikely(__pyx_v_args == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 474, __pyx_L1_error)
          }
          __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_v_arg = __pyx_t_3;
          __pyx_t_3 = 0;

    +0475:                 if isinstance(arg, type) and issubclass(arg, BaseException):

          __pyx_t_2 = PyType_Check(__pyx_v_arg);
          if (__pyx_t_2) {
          } else {
            __pyx_t_1 = __pyx_t_2;
            goto __pyx_L8_bool_binop_done;
          }
          __pyx_t_2 = PyObject_IsSubclass(__pyx_v_arg, ((PyObject *)(((PyTypeObject*)PyExc_BaseException)))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 475, __pyx_L1_error)
          __pyx_t_1 = __pyx_t_2;
          __pyx_L8_bool_binop_done:;
          if (__pyx_t_1) {
    /* … */
            goto __pyx_L7;
          }

    +0476:                     args = (arg, arg(), None)

            __pyx_t_5 = NULL;
            __Pyx_INCREF(__pyx_v_arg);
            __pyx_t_6 = __pyx_v_arg;
            __pyx_t_7 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
              assert(__pyx_t_5);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
              __pyx_t_7 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
            }
            __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 476, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(__pyx_v_arg);
            __Pyx_GIVEREF(__pyx_v_arg);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_arg) != (0)) __PYX_ERR(0, 476, __pyx_L1_error);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 476, __pyx_L1_error);
            __Pyx_INCREF(Py_None);
            __Pyx_GIVEREF(Py_None);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, Py_None) != (0)) __PYX_ERR(0, 476, __pyx_L1_error);
            __pyx_t_3 = 0;
            __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_6));
            __pyx_t_6 = 0;

     0477:                 else:

    +0478:                     args = (type(arg), arg, None)

          /*else*/ {
            __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 478, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_arg)));
            __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_arg)));
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)Py_TYPE(__pyx_v_arg))) != (0)) __PYX_ERR(0, 478, __pyx_L1_error);
            __Pyx_INCREF(__pyx_v_arg);
            __Pyx_GIVEREF(__pyx_v_arg);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_arg) != (0)) __PYX_ERR(0, 478, __pyx_L1_error);
            __Pyx_INCREF(Py_None);
            __Pyx_GIVEREF(Py_None);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, Py_None) != (0)) __PYX_ERR(0, 478, __pyx_L1_error);
            __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_6));
            __pyx_t_6 = 0;
          }
          __pyx_L7:;

    +0479:             elif not args:

        __pyx_t_1 = (__pyx_v_args != Py_None)&&(__Pyx_PyTuple_GET_SIZE(__pyx_v_args) != 0);
        if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_1 < 0))) __PYX_ERR(0, 479, __pyx_L1_error)
        __pyx_t_2 = (!__pyx_t_1);
        if (__pyx_t_2) {
    /* … */
        }
        __pyx_L6:;

    +0480:                 args = (GreenletExit, GreenletExit(), None)

          __pyx_t_3 = NULL;
          __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);
          __pyx_t_5 = __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit;
          __pyx_t_7 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
            assert(__pyx_t_3);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
            __pyx_t_7 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 480, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);
          __Pyx_GIVEREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit) != (0)) __PYX_ERR(0, 480, __pyx_L1_error);
          __Pyx_GIVEREF(__pyx_t_6);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 480, __pyx_L1_error);
          __Pyx_INCREF(Py_None);
          __Pyx_GIVEREF(Py_None);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None) != (0)) __PYX_ERR(0, 480, __pyx_L1_error);
          __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_5));
          __pyx_t_5 = 0;

    +0481:             if not issubclass(args[0], BaseException):

        if (unlikely(__pyx_v_args == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 481, __pyx_L1_error)
        }
        __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PyObject_IsSubclass(__pyx_t_5, ((PyObject *)(((PyTypeObject*)PyExc_BaseException)))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 481, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_1 = (!__pyx_t_2);
        if (__pyx_t_1) {
    /* … */
        }

     0482:                 # Random non-type, non-exception arguments.

    +0483:                 args = (BaseException, BaseException(args), None)

          __pyx_t_6 = NULL;
          __Pyx_INCREF((PyObject *)(((PyTypeObject*)PyExc_BaseException)));
          __pyx_t_3 = ((PyObject *)(((PyTypeObject*)PyExc_BaseException)));
          __pyx_t_7 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_args};
            __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_INCREF((PyObject *)(((PyTypeObject*)PyExc_BaseException)));
          __Pyx_GIVEREF((PyObject *)(((PyTypeObject*)PyExc_BaseException)));
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(((PyTypeObject*)PyExc_BaseException)))) != (0)) __PYX_ERR(0, 483, __pyx_L1_error);
          __Pyx_GIVEREF(__pyx_t_5);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 483, __pyx_L1_error);
          __Pyx_INCREF(Py_None);
          __Pyx_GIVEREF(Py_None);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None) != (0)) __PYX_ERR(0, 483, __pyx_L1_error);
          __pyx_t_5 = 0;
          __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_3));
          __pyx_t_3 = 0;

    +0484:             assert issubclass(args[0], BaseException)

        #ifndef CYTHON_WITHOUT_ASSERTIONS
        if (unlikely(__pyx_assertions_enabled())) {
          if (unlikely(__pyx_v_args == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 484, __pyx_L1_error)
          }
          __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 484, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = PyObject_IsSubclass(__pyx_t_3, ((PyObject *)(((PyTypeObject*)PyExc_BaseException)))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 484, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) {
            __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
            __PYX_ERR(0, 484, __pyx_L1_error)
          }
        }
        #else
        if ((1)); else __PYX_ERR(0, 484, __pyx_L1_error)
        #endif

    +0485:             self.__report_error(args)

        __pyx_t_3 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_error(__pyx_v_self, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0486:

    +0487:     @property

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_7started___get__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.started.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0488:     def started(self):

     0489:         # DEPRECATED

    +0490:         return bool(self)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 490, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

     0491:

    +0492:     def ready(self):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_9ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_ready(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) {
      int __pyx_r;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_ready); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_9ready)) {
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __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_typedict_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
      }
    /* … */
      /* 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_cgreenlet.Greenlet.ready", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_9ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_8ready, "Greenlet.ready(self) -> bool\n\nReturn a true value if and only if the greenlet has finished\nexecution.\n\n.. versionchanged:: 1.1\n    This function is only guaranteed to return true or false *values*, not\n    necessarily the literal constants ``True`` or ``False``.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_9ready = {"ready", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_9ready, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_8ready};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_9ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("ready (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_8ready(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_8ready(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_ready(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.ready", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_9ready, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_ready, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_ready, __pyx_t_5) < 0) __PYX_ERR(0, 492, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0493:         """

     0494:         Return a true value if and only if the greenlet has finished

     0495:         execution.

     0496:

     0497:         .. versionchanged:: 1.1

     0498:             This function is only guaranteed to return true or false *values*, not

     0499:             necessarily the literal constants ``True`` or ``False``.

     0500:         """

    +0501:         return self.dead or self._exc_info is not None

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 501, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (!__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L3_bool_binop_done;
      }
      __pyx_t_7 = (__pyx_v_self->_exc_info != ((PyObject*)Py_None));
      __pyx_t_6 = __pyx_t_7;
      __pyx_L3_bool_binop_done:;
      __pyx_r = __pyx_t_6;
      goto __pyx_L0;

     0502:

    +0503:     def successful(self):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_11successful(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_successful(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) {
      int __pyx_r;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_successful); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_11successful)) {
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __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_typedict_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
      }
    /* … */
      /* 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_cgreenlet.Greenlet.successful", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_11successful(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_10successful, "Greenlet.successful(self) -> bool\n\nReturn a true value if and only if the greenlet has finished execution\nsuccessfully, that is, without raising an error.\n\n.. tip:: A greenlet that has been killed with the default\n    :class:`GreenletExit` exception is considered successful.\n    That is, ``GreenletExit`` is not considered an error.\n\n.. note:: This function is only guaranteed to return true or false *values*,\n      not necessarily the literal constants ``True`` or ``False``.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_11successful = {"successful", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_11successful, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_10successful};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_11successful(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("successful (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_10successful(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_10successful(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_successful(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.successful", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_11successful, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_successful, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_successful, __pyx_t_5) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0504:         """

     0505:         Return a true value if and only if the greenlet has finished execution

     0506:         successfully, that is, without raising an error.

     0507:

     0508:         .. tip:: A greenlet that has been killed with the default

     0509:             :class:`GreenletExit` exception is considered successful.

     0510:             That is, ``GreenletExit`` is not considered an error.

     0511:

     0512:         .. note:: This function is only guaranteed to return true or false *values*,

     0513:               not necessarily the literal constants ``True`` or ``False``.

     0514:         """

    +0515:         return self._exc_info is not None and self._exc_info[1] is None

      __pyx_t_7 = (__pyx_v_self->_exc_info != ((PyObject*)Py_None));
      if (__pyx_t_7) {
      } else {
        __pyx_t_6 = __pyx_t_7;
        goto __pyx_L3_bool_binop_done;
      }
      if (unlikely(__pyx_v_self->_exc_info == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 515, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_exc_info, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = (__pyx_t_1 == Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = __pyx_t_7;
      __pyx_L3_bool_binop_done:;
      __pyx_r = __pyx_t_6;
      goto __pyx_L0;

     0516:

    +0517:     def __repr__(self):

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_12__repr__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_v_classname = NULL;
      PyObject *__pyx_v_name = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_v_formatted = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_classname);
      __Pyx_XDECREF(__pyx_v_name);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_formatted);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0518:         classname = self.__class__.__name__

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_classname = __pyx_t_2;
      __pyx_t_2 = 0;

     0519:         # If no name has been assigned, don't generate one, including a minimal_ident,

     0520:         # if not necessary. This reduces the use of weak references and associated

     0521:         # overhead.

    +0522:         if 'name' not in self.__dict__ and self._ident is None:

      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_n_u_name_2, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 522, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_4) {
      } else {
        __pyx_t_3 = __pyx_t_4;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_4 = (__pyx_v_self->_ident == Py_None);
      __pyx_t_3 = __pyx_t_4;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_3) {
    /* … */
        goto __pyx_L3;
      }

    +0523:             name = ' '

        __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_);
        __pyx_v_name = __pyx_mstate_global->__pyx_kp_u_;

     0524:         else:

    +0525:             name = ' "%s" ' % (self.name,)

      /*else*/ {
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_2), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u__2;
        __pyx_t_5[1] = __pyx_t_1;
        __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u__3;
        __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 2 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_name = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;
      }
      __pyx_L3:;

    +0526:         result = '<%s%sat %s' % (classname, name, hex(id(self)))

      __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_classname), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u__4;
      __pyx_t_7[1] = __pyx_t_2;
      __pyx_t_7[2] = __pyx_v_name;
      __pyx_t_7[3] = __pyx_mstate_global->__pyx_kp_u_at;
      __pyx_t_7[4] = __pyx_t_1;
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_name) + 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_name) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1));
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __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_v_result = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

    +0527:         formatted = self._formatinfo()

      __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_formatinfo(__pyx_v_self, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 527, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_v_formatted = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

    +0528:         if formatted:

      __pyx_t_3 = (__pyx_v_formatted != Py_None)&&(__Pyx_PyUnicode_IS_TRUE(__pyx_v_formatted) != 0);
      if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_3 < 0))) __PYX_ERR(0, 528, __pyx_L1_error)
      if (__pyx_t_3) {
    /* … */
      }

    +0529:             result += ': ' + formatted

        __pyx_t_6 = __Pyx_PyUnicode_ConcatSafe(__pyx_mstate_global->__pyx_kp_u__5, __pyx_v_formatted); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_v_result, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

    +0530:         return result + '>'

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_v_result, __pyx_mstate_global->__pyx_kp_u__6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0531:

     0532:

    +0533:     def _formatinfo(self):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__formatinfo(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) {
      PyObject *__pyx_v_info = NULL;
      PyObject *__pyx_v_func = NULL;
      PyObject *__pyx_v_im_self = NULL;
      PyObject *__pyx_v_funcname = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_v_args = NULL;
      PyObject *__pyx_7genexpr__pyx_v_x = NULL;
      PyObject *__pyx_8genexpr1__pyx_v_key = NULL;
      PyObject *__pyx_8genexpr1__pyx_v_value = NULL;
      PyObject *__pyx_r = NULL;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_formatinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 533, __pyx_L1_error)
            __pyx_r = ((PyObject*)__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_typedict_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
      }
    /* … */
      /* 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_11);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._formatinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_info);
      __Pyx_XDECREF(__pyx_v_func);
      __Pyx_XDECREF(__pyx_v_im_self);
      __Pyx_XDECREF(__pyx_v_funcname);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_args);
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x);
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_key);
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_value);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_14_formatinfo, "Greenlet._formatinfo(self) -> str");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo = {"_formatinfo", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_14_formatinfo};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_formatinfo (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_14_formatinfo(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_14_formatinfo(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__formatinfo(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __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_cgreenlet.Greenlet._formatinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet__formatinfo, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_formatinfo, __pyx_t_5) < 0) __PYX_ERR(0, 533, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +0534:         info = self._formatted_info

      __pyx_t_1 = __pyx_v_self->_formatted_info;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_info = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +0535:         if info is not None:

      __pyx_t_6 = (__pyx_v_info != ((PyObject*)Py_None));
      if (__pyx_t_6) {
    /* … */
      }

    +0536:             return info

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_info);
        __pyx_r = __pyx_v_info;
        goto __pyx_L0;

     0537:

     0538:         # Are we running an arbitrary function provided to the constructor,

     0539:         # or did a subclass override _run?

    +0540:         func = self._run

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_run_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_func = __pyx_t_1;
      __pyx_t_1 = 0;

    +0541:         im_self = getattr(func, '__self__', None)

      __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_func, __pyx_mstate_global->__pyx_n_u_self, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_im_self = __pyx_t_1;
      __pyx_t_1 = 0;

    +0542:         if im_self is self:

      __pyx_t_6 = (__pyx_v_im_self == ((PyObject *)__pyx_v_self));
      if (__pyx_t_6) {
    /* … */
        goto __pyx_L4;
      }

    +0543:             funcname = '_run'

        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_run_2);
        __pyx_v_funcname = __pyx_mstate_global->__pyx_n_u_run_2;

    +0544:         elif im_self is not None:

      __pyx_t_6 = (__pyx_v_im_self != Py_None);
      if (__pyx_t_6) {
    /* … */
        goto __pyx_L4;
      }

    +0545:             funcname = repr(func)

        __pyx_t_1 = PyObject_Repr(__pyx_v_func); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_funcname = __pyx_t_1;
        __pyx_t_1 = 0;

     0546:         else:

    +0547:             funcname = getattr(func, '__name__', '') or repr(func)

      /*else*/ {
        __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_func, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u__7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 547, __pyx_L1_error)
        if (!__pyx_t_6) {
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_1 = __pyx_t_2;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L5_bool_binop_done;
        }
        __pyx_t_2 = PyObject_Repr(__pyx_v_func); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_1 = __pyx_t_2;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_L5_bool_binop_done:;
        __pyx_v_funcname = __pyx_t_1;
        __pyx_t_1 = 0;
      }
      __pyx_L4:;

     0548:

    +0549:         result = funcname

      __Pyx_INCREF(__pyx_v_funcname);
      __pyx_v_result = __pyx_v_funcname;

    +0550:         args = []

      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_args = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +0551:         if self.args:

      __pyx_t_6 = (__pyx_v_self->args != Py_None)&&(__Pyx_PyTuple_GET_SIZE(__pyx_v_self->args) != 0);
      if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 551, __pyx_L1_error)
      if (__pyx_t_6) {
    /* … */
      }

    +0552:             args = [repr(x)[:50] for x in self.args]

        { /* enter inner scope */
          __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (unlikely(__pyx_v_self->args == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
            __PYX_ERR(0, 552, __pyx_L10_error)
          }
          __pyx_t_2 = __pyx_v_self->args; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_7 = 0;
          for (;;) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 552, __pyx_L10_error)
              #endif
              if (__pyx_t_7 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7);
            #endif
            ++__pyx_t_7;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_4);
            __pyx_t_4 = 0;
            __pyx_t_4 = PyObject_Repr(__pyx_7genexpr__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_4);
            if (unlikely(__pyx_t_4 == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(0, 552, __pyx_L10_error)
            }
            __pyx_t_3 = __Pyx_PyUnicode_Substring(__pyx_t_4, 0, 50); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 552, __pyx_L10_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
          goto __pyx_L14_exit_scope;
          __pyx_L10_error:;
          __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
          goto __pyx_L1_error;
          __pyx_L14_exit_scope:;
        } /* exit inner scope */
        __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

    +0553:         if self.kwargs:

      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->kwargs); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 553, __pyx_L1_error)
      if (__pyx_t_6) {
    /* … */
      }

    +0554:             args.extend(['%s=%s' % (key, repr(value)[:50]) for (key, value) in self.kwargs.items()])

        { /* enter inner scope */
          __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_7 = 0;
          if (unlikely(__pyx_v_self->kwargs == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
            __PYX_ERR(0, 554, __pyx_L18_error)
          }
          __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->kwargs, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF(__pyx_t_2);
          __pyx_t_2 = __pyx_t_3;
          __pyx_t_3 = 0;
          while (1) {
            __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_8, &__pyx_t_7, &__pyx_t_3, &__pyx_t_4, NULL, __pyx_t_9);
            if (unlikely(__pyx_t_10 == 0)) break;
            if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 554, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_key, __pyx_t_3);
            __pyx_t_3 = 0;
            __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_value, __pyx_t_4);
            __pyx_t_4 = 0;
            __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_8genexpr1__pyx_v_key), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = PyObject_Repr(__pyx_8genexpr1__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (unlikely(__pyx_t_3 == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(0, 554, __pyx_L18_error)
            }
            __pyx_t_11 = __Pyx_PyUnicode_Substring(__pyx_t_3, 0, 50); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 554, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_12[0] = __pyx_t_4;
            __pyx_t_12[1] = __pyx_mstate_global->__pyx_kp_u__8;
            __pyx_t_12[2] = __pyx_t_11;
            __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_12, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11));
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 554, __pyx_L18_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_key); __pyx_8genexpr1__pyx_v_key = 0;
          __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_value); __pyx_8genexpr1__pyx_v_value = 0;
          goto __pyx_L21_exit_scope;
          __pyx_L18_error:;
          __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_key); __pyx_8genexpr1__pyx_v_key = 0;
          __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_value); __pyx_8genexpr1__pyx_v_value = 0;
          goto __pyx_L1_error;
          __pyx_L21_exit_scope:;
        } /* exit inner scope */
        __pyx_t_13 = __Pyx_PyList_Extend(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 554, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0555:         if args:

      __pyx_t_6 = (__Pyx_PyList_GET_SIZE(__pyx_v_args) != 0);
      if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 555, __pyx_L1_error)
      if (__pyx_t_6) {
    /* … */
      }

    +0556:             result += '(' + ', '.join(args) + ')'

        __pyx_t_1 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__10, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u__9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_mstate_global->__pyx_kp_u__11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __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, 556, __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;

     0557:         # it is important to save the result here, because once the greenlet exits '_run' attribute will be removed

    +0558:         self._formatted_info = result

      __pyx_t_2 = __pyx_v_result;
      __Pyx_INCREF(__pyx_t_2);
      if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 558, __pyx_L1_error)
      __Pyx_GIVEREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_v_self->_formatted_info);
      __Pyx_DECREF(__pyx_v_self->_formatted_info);
      __pyx_v_self->_formatted_info = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

    +0559:         return result

      __Pyx_XDECREF(__pyx_r);
      if (!(likely(PyUnicode_CheckExact(__pyx_v_result))||((__pyx_v_result) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_result))) __PYX_ERR(0, 559, __pyx_L1_error)
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = ((PyObject*)__pyx_v_result);
      goto __pyx_L0;

     0560:

    +0561:     @property

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_9exception___get__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.exception.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0562:     def exception(self):

     0563:         """

     0564:         Holds the exception instance raised by the function if the

     0565:         greenlet has finished with an error. Otherwise ``None``.

     0566:         """

    +0567:         return self._exc_info[1] if self._exc_info is not None else None

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = (__pyx_v_self->_exc_info != ((PyObject*)Py_None));
      if (__pyx_t_2) {
        if (unlikely(__pyx_v_self->_exc_info == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 567, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_exc_info, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __pyx_t_3;
        __pyx_t_3 = 0;
      } else {
        __Pyx_INCREF(Py_None);
        __pyx_t_1 = Py_None;
      }
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     0568:

    +0569:     @property

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

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_8exc_info___get__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_v_ei = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.exc_info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_ei);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

     0570:     def exc_info(self):

     0571:         """

     0572:         Holds the exc_info three-tuple raised by the function if the

     0573:         greenlet finished with an error. Otherwise a false value.

     0574:

     0575:         .. note:: This is a provisional API and may change.

     0576:

     0577:         .. versionadded:: 1.1

     0578:         """

    +0579:         ei = self._exc_info

      __pyx_t_1 = __pyx_v_self->_exc_info;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_ei = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +0580:         if ei is not None and ei[0] is not None:

      __pyx_t_3 = (__pyx_v_ei != ((PyObject*)Py_None));
      if (__pyx_t_3) {
      } else {
        __pyx_t_2 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      if (unlikely(__pyx_v_ei == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 580, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_ei, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = (__pyx_t_1 != Py_None);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_2 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_2) {
    /* … */
      }

    +0581:             return (

        __Pyx_XDECREF(__pyx_r);

    +0582:                 ei[0],

        if (unlikely(__pyx_v_ei == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 582, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_ei, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
    /* … */
        __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 582, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 582, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 582, __pyx_L1_error);
        __pyx_t_1 = 0;
        __pyx_t_4 = 0;
        __pyx_t_5 = 0;
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L0;

    +0583:                 ei[1],

        if (unlikely(__pyx_v_ei == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 583, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_ei, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);

     0584:                 # The pickled traceback may be None if we couldn't pickle it.

    +0585:                 load_traceback(ei[2]) if ei[2] else None

        if (unlikely(__pyx_v_ei == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 585, __pyx_L1_error)
        }
        __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_ei, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 585, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_2) {
          __pyx_t_7 = NULL;
          __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_load_traceback);
          __pyx_t_8 = __pyx_v_6gevent_17_gevent_cgreenlet_load_traceback;
          if (unlikely(__pyx_v_ei == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 585, __pyx_L1_error)
          }
          __pyx_t_9 = __Pyx_GetItemInt_Tuple(__pyx_v_ei, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 585, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_8))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
            assert(__pyx_t_7);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
            __pyx_t_10 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __pyx_t_5 = __pyx_t_6;
          __pyx_t_6 = 0;
        } else {
          __Pyx_INCREF(Py_None);
          __pyx_t_5 = Py_None;
        }

     0586:             )

     0587:

    +0588:     def throw(self, *args):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_17throw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_16throw, "Greenlet.throw(self, *args)\n\nImmediately switch into the greenlet and raise an exception in it.\n\nShould only be called from the HUB, otherwise the current greenlet is left unscheduled forever.\nTo raise an exception in a safe manner from any greenlet, use :meth:`kill`.\n\nIf a greenlet was started but never switched to yet, then also\na) cancel the event that will start it\nb) fire the notifications as if an exception was raised in a greenlet");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_17throw = {"throw", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_17throw, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_16throw};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_17throw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_args = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("throw (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("throw", __pyx_kwds); return NULL;}
      __Pyx_INCREF(__pyx_args);
      __pyx_v_args = __pyx_args;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_16throw(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_args);

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_16throw(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_args) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_AddTraceback("gevent._gevent_cgreenlet.Greenlet.throw", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_17throw, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_throw, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_throw, __pyx_t_5) < 0) __PYX_ERR(0, 588, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0589:         """Immediately switch into the greenlet and raise an exception in it.

     0590:

     0591:         Should only be called from the HUB, otherwise the current greenlet is left unscheduled forever.

     0592:         To raise an exception in a safe manner from any greenlet, use :meth:`kill`.

     0593:

     0594:         If a greenlet was started but never switched to yet, then also

     0595:         a) cancel the event that will start it

     0596:         b) fire the notifications as if an exception was raised in a greenlet

     0597:         """

    +0598:         self.__cancel_start()

      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__cancel_start(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0599:

    +0600:         try:

      /*try:*/ {

    +0601:             if not self.dead:

        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 601, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_3 = (!__pyx_t_2);
        if (__pyx_t_3) {
    /* … */
        }
      }

     0602:                 # Prevent switching into a greenlet *at all* if we had never

     0603:                 # started it. Usually this is the same thing that happens by throwing,

     0604:                 # but if this is done from the hub with nothing else running, prevents a

     0605:                 # LoopExit.

    +0606:                 greenlet.throw(self, *args)

          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet), __pyx_mstate_global->__pyx_n_u_throw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF((PyObject *)__pyx_v_self);
          __Pyx_GIVEREF((PyObject *)__pyx_v_self);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 606, __pyx_L4_error);
          __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 606, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     0607:         finally:

    +0608:             self.__handle_death_before_start(args)

      /*finally:*/ {
        /*normal exit:*/{
          __pyx_t_4 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__handle_death_before_start(__pyx_v_self, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L5;
        }
        __pyx_L4_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 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_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          if ( unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
          {
            __pyx_t_4 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__handle_death_before_start(__pyx_v_self, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11);
          __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
          __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8;
          goto __pyx_L1_error;
          __pyx_L8_error:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __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;
          __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0;
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }

     0609:

    +0610:     def start(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_19start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_18start, "Greenlet.start(self)\n\nSchedule the greenlet to run in this loop iteration");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_19start = {"start", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_19start, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_18start};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_19start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("start (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_18start(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_18start(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_hub = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_cgreenlet.Greenlet.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_hub);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_19start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_start, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_5) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0611:         """Schedule the greenlet to run in this loop iteration"""

    +0612:         if self._start_event is None:

      __pyx_t_1 = (__pyx_v_self->_start_event == Py_None);
      if (__pyx_t_1) {
    /* … */
      }

    +0613:             _call_spawn_callbacks(self)

        __pyx_f_6gevent_17_gevent_cgreenlet__call_spawn_callbacks(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L1_error)

    +0614:             hub = get_my_hub(self) # pylint:disable=undefined-variable

        __pyx_t_2 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 614, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_hub = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_2);
        __pyx_t_2 = 0;

    +0615:             self._start_event = hub.loop.run_callback(self.switch)

        __pyx_t_3 = __pyx_v_hub->loop;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_switch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 615, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_run_callback, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_start_event);
        __Pyx_DECREF(__pyx_v_self->_start_event);
        __pyx_v_self->_start_event = __pyx_t_2;
        __pyx_t_2 = 0;

     0616:

    +0617:     def start_later(self, seconds):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_21start_later(PyObject *__pyx_v_self, PyObject *__pyx_v_seconds); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_20start_later, "Greenlet.start_later(self, seconds)\n\nstart_later(seconds) -> None\n\nSchedule the greenlet to run in the future loop iteration\n*seconds* later");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_21start_later = {"start_later", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_21start_later, METH_O, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_20start_later};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_21start_later(PyObject *__pyx_v_self, PyObject *__pyx_v_seconds) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("start_later (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_20start_later(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), ((PyObject *)__pyx_v_seconds));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_20start_later(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_seconds) {
      struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_hub = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_5);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.start_later", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_hub);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_21start_later, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_start_later, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_start_later, __pyx_t_5) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0618:         """

     0619:         start_later(seconds) -> None

     0620:

     0621:         Schedule the greenlet to run in the future loop iteration

     0622:         *seconds* later

     0623:         """

    +0624:         if self._start_event is None:

      __pyx_t_1 = (__pyx_v_self->_start_event == Py_None);
      if (__pyx_t_1) {
    /* … */
      }

    +0625:             _call_spawn_callbacks(self)

        __pyx_f_6gevent_17_gevent_cgreenlet__call_spawn_callbacks(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 625, __pyx_L1_error)

    +0626:             hub = get_my_hub(self) # pylint:disable=undefined-variable

        __pyx_t_2 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_hub = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_2);
        __pyx_t_2 = 0;

    +0627:             self._start_event = hub.loop.timer(seconds)

        __pyx_t_3 = __pyx_v_hub->loop;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_seconds};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_timer, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->_start_event);
        __Pyx_DECREF(__pyx_v_self->_start_event);
        __pyx_v_self->_start_event = __pyx_t_2;
        __pyx_t_2 = 0;

    +0628:             self._start_event.start(self.switch)

        __pyx_t_3 = __pyx_v_self->_start_event;
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_switch); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0629:

    +0630:     @staticmethod

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_23add_spawn_callback(CYTHON_UNUSED PyObject *__pyx_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_17_gevent_cgreenlet_8Greenlet_22add_spawn_callback, "Greenlet.add_spawn_callback(callback)\n\nadd_spawn_callback(callback) -> None\n\nSet up a *callback* to be invoked when :class:`Greenlet` objects\nare started.\n\nThe invocation order of spawn callbacks is unspecified.  Adding the\nsame callback more than one time will not cause it to be called more\nthan once.\n\n.. versionadded:: 1.4.0");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_23add_spawn_callback = {"add_spawn_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_23add_spawn_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_22add_spawn_callback};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_23add_spawn_callback(CYTHON_UNUSED PyObject *__pyx_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_callback = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("add_spawn_callback (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 630, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 630, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_spawn_callback", 0) < 0) __PYX_ERR(0, 630, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_spawn_callback", 1, 1, 1, i); __PYX_ERR(0, 630, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 630, __pyx_L3_error)
        }
        __pyx_v_callback = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("add_spawn_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 630, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.add_spawn_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_22add_spawn_callback(__pyx_v_callback);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_22add_spawn_callback(PyObject *__pyx_v_callback) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.add_spawn_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_23add_spawn_callback, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_add_spawn_callback, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_add_spawn_callback, __pyx_t_5) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_builtin_staticmethod);
      __pyx_t_7 = __pyx_builtin_staticmethod;
      __Pyx_GetNameInClass(__pyx_t_3, (PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_add_spawn_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 630, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_add_spawn_callback, __pyx_t_5) < 0) __PYX_ERR(0, 630, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0631:     def add_spawn_callback(callback):

     0632:         """

     0633:         add_spawn_callback(callback) -> None

     0634:

     0635:         Set up a *callback* to be invoked when :class:`Greenlet` objects

     0636:         are started.

     0637:

     0638:         The invocation order of spawn callbacks is unspecified.  Adding the

     0639:         same callback more than one time will not cause it to be called more

     0640:         than once.

     0641:

     0642:         .. versionadded:: 1.4.0

     0643:         """

     0644:         global _spawn_callbacks

    +0645:         if _spawn_callbacks is None:  # pylint:disable=used-before-assignment

      __pyx_t_1 = (__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks == ((PyObject*)Py_None));
      if (__pyx_t_1) {
    /* … */
      }

    +0646:             _spawn_callbacks = set()

        __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks);
        __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks, ((PyObject*)__pyx_t_2));
        __Pyx_GIVEREF(__pyx_t_2);
        __pyx_t_2 = 0;

    +0647:         _spawn_callbacks.add(callback)

      if (unlikely(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
        __PYX_ERR(0, 647, __pyx_L1_error)
      }
      __pyx_t_3 = PySet_Add(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks, __pyx_v_callback); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 647, __pyx_L1_error)

     0648:

    +0649:     @staticmethod

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_25remove_spawn_callback(CYTHON_UNUSED PyObject *__pyx_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_17_gevent_cgreenlet_8Greenlet_24remove_spawn_callback, "Greenlet.remove_spawn_callback(callback)\n\nremove_spawn_callback(callback) -> None\n\nRemove *callback* function added with :meth:`Greenlet.add_spawn_callback`.\nThis function will not fail if *callback* has been already removed or\nif *callback* was never added.\n\n.. versionadded:: 1.4.0");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_25remove_spawn_callback = {"remove_spawn_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_25remove_spawn_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_24remove_spawn_callback};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_25remove_spawn_callback(CYTHON_UNUSED PyObject *__pyx_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_callback = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("remove_spawn_callback (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 649, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 649, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "remove_spawn_callback", 0) < 0) __PYX_ERR(0, 649, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("remove_spawn_callback", 1, 1, 1, i); __PYX_ERR(0, 649, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 649, __pyx_L3_error)
        }
        __pyx_v_callback = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("remove_spawn_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 649, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.remove_spawn_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_24remove_spawn_callback(__pyx_v_callback);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_24remove_spawn_callback(PyObject *__pyx_v_callback) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.remove_spawn_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_25remove_spawn_callback, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_remove_spawn_callback, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_remove_spawn_callback, __pyx_t_5) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = NULL;
      __Pyx_INCREF(__pyx_builtin_staticmethod);
      __pyx_t_3 = __pyx_builtin_staticmethod;
      __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_remove_spawn_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_2};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
      }
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_remove_spawn_callback, __pyx_t_5) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0650:     def remove_spawn_callback(callback):

     0651:         """

     0652:         remove_spawn_callback(callback) -> None

     0653:

     0654:         Remove *callback* function added with :meth:`Greenlet.add_spawn_callback`.

     0655:         This function will not fail if *callback* has been already removed or

     0656:         if *callback* was never added.

     0657:

     0658:         .. versionadded:: 1.4.0

     0659:         """

     0660:         global _spawn_callbacks

    +0661:         if _spawn_callbacks is not None:

      __pyx_t_1 = (__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks != ((PyObject*)Py_None));
      if (__pyx_t_1) {
    /* … */
      }

    +0662:             _spawn_callbacks.discard(callback)

        if (unlikely(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard");
          __PYX_ERR(0, 662, __pyx_L1_error)
        }
        __pyx_t_2 = __Pyx_PySet_Discard(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks, __pyx_v_callback); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 662, __pyx_L1_error)

    +0663:             if not _spawn_callbacks:

        __pyx_t_1 = (__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks != Py_None)&&(__Pyx_PySet_GET_SIZE(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks) != 0);
        if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_1 < 0))) __PYX_ERR(0, 663, __pyx_L1_error)
        __pyx_t_3 = (!__pyx_t_1);
        if (__pyx_t_3) {
    /* … */
        }

    +0664:                 _spawn_callbacks = None

          __Pyx_INCREF(Py_None);
          __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks);
          __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks, ((PyObject*)Py_None));
          __Pyx_GIVEREF(Py_None);

     0665:

    +0666:     @classmethod

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_27spawn(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_26spawn, "Greenlet.spawn(cls, *args, **kwargs)\n\nspawn(function, *args, **kwargs) -> Greenlet\n\nCreate a new :class:`Greenlet` object and schedule it to run ``function(*args, **kwargs)``.\nThis can be used as ``gevent.spawn`` or ``Greenlet.spawn``.\n\nThe arguments are passed to :meth:`Greenlet.__init__`.\n\n.. versionchanged:: 1.1b1\n    If a *function* is given that is not callable, immediately raise a :exc:`TypeError`\n    instead of spawning a greenlet that will raise an uncaught TypeError.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_27spawn = {"spawn", (PyCFunction)(void(*)(void))(PyCFunctionWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_27spawn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_26spawn};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_27spawn(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      PyObject *__pyx_v_args = 0;
      PyObject *__pyx_v_kwargs = 0;
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("spawn (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return NULL;
      if (__pyx_kwds_len > 0) {
        if (unlikely(__Pyx_CheckKeywordStrings("spawn", __pyx_kwds) == -1)) return NULL;
        __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
        if (unlikely(!__pyx_v_kwargs)) return NULL;
        __Pyx_GOTREF(__pyx_v_kwargs);
      } else {
        __pyx_v_kwargs = PyDict_New();
        if (unlikely(!__pyx_v_kwargs)) return NULL;
        __Pyx_GOTREF(__pyx_v_kwargs);
      }
      __Pyx_INCREF(__pyx_args);
      __pyx_v_args = __pyx_args;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_26spawn(((PyTypeObject*)__pyx_v_cls), __pyx_v_args, __pyx_v_kwargs);

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_26spawn(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_v_g = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.spawn", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_g);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_27spawn, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_spawn, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_spawn, __pyx_t_5) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GetNameInClass(__pyx_t_5, (PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_spawn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_spawn, __pyx_t_3) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0667:     def spawn(cls, *args, **kwargs):

     0668:         """

     0669:         spawn(function, *args, **kwargs) -> Greenlet

     0670:

     0671:         Create a new :class:`Greenlet` object and schedule it to run ``function(*args, **kwargs)``.

     0672:         This can be used as ``gevent.spawn`` or ``Greenlet.spawn``.

     0673:

     0674:         The arguments are passed to :meth:`Greenlet.__init__`.

     0675:

     0676:         .. versionchanged:: 1.1b1

     0677:             If a *function* is given that is not callable, immediately raise a :exc:`TypeError`

     0678:             instead of spawning a greenlet that will raise an uncaught TypeError.

     0679:         """

    +0680:         g = cls(*args, **kwargs)

      __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_v_args, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_g = __pyx_t_2;
      __pyx_t_2 = 0;

    +0681:         g.start()

      __pyx_t_1 = __pyx_v_g;
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0682:         return g

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_g);
      __pyx_r = __pyx_v_g;
      goto __pyx_L0;

     0683:

    +0684:     @classmethod

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_29spawn_later(PyObject *__pyx_v_cls,
    #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_17_gevent_cgreenlet_8Greenlet_28spawn_later, "Greenlet.spawn_later(cls, seconds, *args, **kwargs)\n\nspawn_later(seconds, function, *args, **kwargs) -> Greenlet\n\nCreate and return a new `Greenlet` object scheduled to run ``function(*args, **kwargs)``\nin a future loop iteration *seconds* later. This can be used as ``Greenlet.spawn_later``\nor ``gevent.spawn_later``.\n\nThe arguments are passed to :meth:`Greenlet.__init__`.\n\n.. versionchanged:: 1.1b1\n   If an argument that's meant to be a function (the first argument in *args*, or the ``run`` keyword )\n   is given to this classmethod (and not a classmethod of a subclass),\n   it is verified to be callable. Previously, the spawned greenlet would have failed\n   when it started running.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_29spawn_later = {"spawn_later", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_29spawn_later, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_28spawn_later};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_29spawn_later(PyObject *__pyx_v_cls,
    #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_seconds = 0;
      PyObject *__pyx_v_args = 0;
      PyObject *__pyx_v_kwargs = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("spawn_later (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
      __Pyx_GOTREF(__pyx_v_kwargs);
      __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
      if (unlikely(!__pyx_v_args)) {
        __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
        __Pyx_RefNannyFinishContext();
        return NULL;
      }
      __Pyx_GOTREF(__pyx_v_args);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_seconds,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 684, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            default:
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 684, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "spawn_later", 1) < 0) __PYX_ERR(0, 684, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("spawn_later", 0, 1, 1, i); __PYX_ERR(0, 684, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs < 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 684, __pyx_L3_error)
        }
        __pyx_v_seconds = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("spawn_later", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 684, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
      __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.spawn_later", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_28spawn_later(((PyTypeObject*)__pyx_v_cls), __pyx_v_seconds, __pyx_v_args, __pyx_v_kwargs);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_DECREF(__pyx_v_args);
      __Pyx_DECREF(__pyx_v_kwargs);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_28spawn_later(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_seconds, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
      PyObject *__pyx_v_g = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.spawn_later", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_g);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_29spawn_later, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_spawn_later, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_spawn_later, __pyx_t_3) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GetNameInClass(__pyx_t_3, (PyObject*)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_spawn_later); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_spawn_later, __pyx_t_5) < 0) __PYX_ERR(0, 684, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0685:     def spawn_later(cls, seconds, *args, **kwargs):

     0686:         """

     0687:         spawn_later(seconds, function, *args, **kwargs) -> Greenlet

     0688:

     0689:         Create and return a new `Greenlet` object scheduled to run ``function(*args, **kwargs)``

     0690:         in a future loop iteration *seconds* later. This can be used as ``Greenlet.spawn_later``

     0691:         or ``gevent.spawn_later``.

     0692:

     0693:         The arguments are passed to :meth:`Greenlet.__init__`.

     0694:

     0695:         .. versionchanged:: 1.1b1

     0696:            If an argument that's meant to be a function (the first argument in *args*, or the ``run`` keyword )

     0697:            is given to this classmethod (and not a classmethod of a subclass),

     0698:            it is verified to be callable. Previously, the spawned greenlet would have failed

     0699:            when it started running.

     0700:         """

    +0701:         if cls is Greenlet and not args and 'run' not in kwargs:

      __pyx_t_2 = (__pyx_v_cls == __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = (__Pyx_PyTuple_GET_SIZE(__pyx_v_args) != 0);
      if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 701, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_2);
      if (__pyx_t_3) {
      } else {
        __pyx_t_1 = __pyx_t_3;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_mstate_global->__pyx_n_u_run, __pyx_v_kwargs, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 701, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {
    /* … */
      }

    +0702:             raise TypeError("")

        __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_6 = __pyx_builtin_TypeError;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u__7};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(0, 702, __pyx_L1_error)

    +0703:         g = cls(*args, **kwargs)

      __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_cls), __pyx_v_args, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_g = __pyx_t_6;
      __pyx_t_6 = 0;

    +0704:         g.start_later(seconds)

      __pyx_t_4 = __pyx_v_g;
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_seconds};
        __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_start_later, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 704, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    +0705:         return g

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_g);
      __pyx_r = __pyx_v_g;
      goto __pyx_L0;

     0706:

    +0707:     def _maybe_kill_before_start(self, exception):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start(PyObject *__pyx_v_self, PyObject *__pyx_v_exception); /*proto*/
    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__maybe_kill_before_start(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_exception, int __pyx_skip_dispatch) {
      PyObject *__pyx_v_dead = NULL;
      PyObject *__pyx_v_args = NULL;
      int __pyx_r;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_maybe_kill_before_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start)) {
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_exception};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __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_typedict_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
      }
    /* … */
      /* 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_cgreenlet.Greenlet._maybe_kill_before_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_dead);
      __Pyx_XDECREF(__pyx_v_args);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start(PyObject *__pyx_v_self, PyObject *__pyx_v_exception); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_30_maybe_kill_before_start, "Greenlet._maybe_kill_before_start(self, exception) -> bool");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start = {"_maybe_kill_before_start", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start, METH_O, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_30_maybe_kill_before_start};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start(PyObject *__pyx_v_self, PyObject *__pyx_v_exception) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_maybe_kill_before_start (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_30_maybe_kill_before_start(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), ((PyObject *)__pyx_v_exception));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_30_maybe_kill_before_start(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_exception) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__maybe_kill_before_start(__pyx_v_self, __pyx_v_exception, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._maybe_kill_before_start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet__maybe_kill_before_star, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_maybe_kill_before_start, __pyx_t_5) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0708:         # Helper for Greenlet.kill(), and also for killall()

    +0709:         self.__cancel_start()

      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__cancel_start(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0710:         self.__free()

      __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 710, __pyx_L1_error)

    +0711:         dead = self.dead

      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_dead = __pyx_t_1;
      __pyx_t_1 = 0;

    +0712:         if dead:

      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_dead); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 712, __pyx_L1_error)
      if (__pyx_t_6) {
    /* … */
      }

    +0713:             if isinstance(exception, tuple) and len(exception) == 3:

        __pyx_t_7 = PyTuple_Check(__pyx_v_exception);
        if (__pyx_t_7) {
        } else {
          __pyx_t_6 = __pyx_t_7;
          goto __pyx_L5_bool_binop_done;
        }
        __pyx_t_8 = PyObject_Length(__pyx_v_exception); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 713, __pyx_L1_error)
        __pyx_t_7 = (__pyx_t_8 == 3);
        __pyx_t_6 = __pyx_t_7;
        __pyx_L5_bool_binop_done:;
        if (__pyx_t_6) {
    /* … */
          goto __pyx_L4;
        }

    +0714:                 args = exception

          __Pyx_INCREF(__pyx_v_exception);
          __pyx_v_args = __pyx_v_exception;

     0715:             else:

    +0716:                 args = (exception,)

        /*else*/ {
          __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(__pyx_v_exception);
          __Pyx_GIVEREF(__pyx_v_exception);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_exception) != (0)) __PYX_ERR(0, 716, __pyx_L1_error);
          __pyx_v_args = __pyx_t_1;
          __pyx_t_1 = 0;
        }
        __pyx_L4:;

    +0717:             self.__handle_death_before_start(args)

        if (!(likely(PyTuple_CheckExact(__pyx_v_args))||((__pyx_v_args) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v_args))) __PYX_ERR(0, 717, __pyx_L1_error)
        __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__handle_death_before_start(__pyx_v_self, ((PyObject*)__pyx_v_args)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0718:         return dead

      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_dead); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 718, __pyx_L1_error)
      __pyx_r = __pyx_t_6;
      goto __pyx_L0;

     0719:

    +0720:     def kill(self, exception=GreenletExit, block=True, timeout=None):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_33kill(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_17_gevent_cgreenlet_8Greenlet_kill(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_17_gevent_cgreenlet_8Greenlet_kill *__pyx_optional_args) {
      PyObject *__pyx_v_exception = __pyx_mstate_global->__pyx_k__12;
      PyObject *__pyx_v_block = ((PyObject *)Py_True);
      PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
      PyObject *__pyx_v_waiter = NULL;
      struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_hub = NULL;
      PyObject *__pyx_r = NULL;
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_exception = __pyx_optional_args->exception;
          if (__pyx_optional_args->__pyx_n > 1) {
            __pyx_v_block = __pyx_optional_args->block;
            if (__pyx_optional_args->__pyx_n > 2) {
              __pyx_v_timeout = __pyx_optional_args->timeout;
            }
          }
        }
      }
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_kill); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_33kill)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_exception, __pyx_v_block, __pyx_v_timeout};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __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_typedict_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
      }
    /* … */
      /* 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_cgreenlet.Greenlet.kill", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_waiter);
      __Pyx_XDECREF((PyObject *)__pyx_v_hub);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_33kill(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_17_gevent_cgreenlet_8Greenlet_32kill, "Greenlet.kill(self, exception=GreenletExit, block=True, timeout=None)\n\nRaise the ``exception`` in the greenlet.\n\nIf ``block`` is ``True`` (the default), wait until the greenlet\ndies or the optional timeout expires; this may require switching\ngreenlets.\nIf block is ``False``, the current greenlet is not unscheduled.\n\nThis function always returns ``None`` and never raises an error. It\nmay be called multpile times on the same greenlet object, and may be\ncalled on an unstarted or dead greenlet.\n\n.. note::\n\n    Depending on what this greenlet is executing and the state\n    of the event loop, the exception may or may not be raised\n    immediately when this greenlet resumes execution. It may\n    be raised on a subsequent green call, or, if this greenlet\n    exits before making such a call, it may not be raised at\n    all. As of 1.1, an example where the exception is raised\n    later is if this greenlet had called :func:`sleep(0)\n    <gevent.sleep>`; an example where the exception is raised\n    immediately is if this greenlet had called\n    :func:`sleep(0.1) <gevent.sleep>`.\n\n.. caution::\n\n    Use care when killing greenlets. If the code executing is not\n    exception safe (e.g., makes proper use of ``finally``) then an\n    unexpected exception could result in corrupted state. Using\n    a :meth:`link` or :meth:`rawlink` (cheaper) may be a safer way to\n    clean up resources.\n\nSee also :func:`gevent.kill` and :func:`gevent.killall`.\n\n:keyword type exception: The type of exception to raise in the greenlet. The default\n    is :class:`GreenletExit`, which indicates a :meth:`successful` completion\n    of the greenlet.\n\n.. versionchanged:: 0.13.0\n    *block* is now ``True`` by default.\n.. versionchanged:: 1.1a2\n    If this greenlet had never been switched to, killing it will\n    prevent it from *ever* being switched to. Links (:meth:`rawlink`)\n    will still be executed, though.\n.. versionchanged:: 20.12.1\n    If this greenlet is :me""th:`ready`, immediately return instead of\n    requiring a trip around the event loop.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_33kill = {"kill", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_33kill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_32kill};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_33kill(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_exception = 0;
      PyObject *__pyx_v_block = 0;
      PyObject *__pyx_v_timeout = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("kill (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_exception,&__pyx_mstate_global->__pyx_n_u_block,&__pyx_mstate_global->__pyx_n_u_timeout,0};
      PyObject* values[3] = {0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 720, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 720, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 720, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 720, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kill", 0) < 0) __PYX_ERR(0, 720, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__12);
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 720, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 720, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 720, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__12);
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_exception = values[0];
        __pyx_v_block = values[1];
        __pyx_v_timeout = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("kill", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 720, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.kill", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_32kill(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_exception, __pyx_v_block, __pyx_v_timeout);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_32kill(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_exception, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.exception = __pyx_v_exception;
      __pyx_t_2.block = __pyx_v_block;
      __pyx_t_2.timeout = __pyx_v_timeout;
      __pyx_t_1 = __pyx_vtabptr_6gevent_17_gevent_cgreenlet_Greenlet->kill(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __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_cgreenlet.Greenlet.kill", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);
      __pyx_mstate_global->__pyx_k__12 = __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit;
      __Pyx_GIVEREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);
      __pyx_t_5 = PyTuple_Pack(3, __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit, Py_True, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_33kill, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_kill, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 720, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_kill, __pyx_t_3) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0721:         """

     0722:         Raise the ``exception`` in the greenlet.

     0723:

     0724:         If ``block`` is ``True`` (the default), wait until the greenlet

     0725:         dies or the optional timeout expires; this may require switching

     0726:         greenlets.

     0727:         If block is ``False``, the current greenlet is not unscheduled.

     0728:

     0729:         This function always returns ``None`` and never raises an error. It

     0730:         may be called multpile times on the same greenlet object, and may be

     0731:         called on an unstarted or dead greenlet.

     0732:

     0733:         .. note::

     0734:

     0735:             Depending on what this greenlet is executing and the state

     0736:             of the event loop, the exception may or may not be raised

     0737:             immediately when this greenlet resumes execution. It may

     0738:             be raised on a subsequent green call, or, if this greenlet

     0739:             exits before making such a call, it may not be raised at

     0740:             all. As of 1.1, an example where the exception is raised

     0741:             later is if this greenlet had called :func:`sleep(0)

     0742:             <gevent.sleep>`; an example where the exception is raised

     0743:             immediately is if this greenlet had called

     0744:             :func:`sleep(0.1) <gevent.sleep>`.

     0745:

     0746:         .. caution::

     0747:

     0748:             Use care when killing greenlets. If the code executing is not

     0749:             exception safe (e.g., makes proper use of ``finally``) then an

     0750:             unexpected exception could result in corrupted state. Using

     0751:             a :meth:`link` or :meth:`rawlink` (cheaper) may be a safer way to

     0752:             clean up resources.

     0753:

     0754:         See also :func:`gevent.kill` and :func:`gevent.killall`.

     0755:

     0756:         :keyword type exception: The type of exception to raise in the greenlet. The default

     0757:             is :class:`GreenletExit`, which indicates a :meth:`successful` completion

     0758:             of the greenlet.

     0759:

     0760:         .. versionchanged:: 0.13.0

     0761:             *block* is now ``True`` by default.

     0762:         .. versionchanged:: 1.1a2

     0763:             If this greenlet had never been switched to, killing it will

     0764:             prevent it from *ever* being switched to. Links (:meth:`rawlink`)

     0765:             will still be executed, though.

     0766:         .. versionchanged:: 20.12.1

     0767:             If this greenlet is :meth:`ready`, immediately return instead of

     0768:             requiring a trip around the event loop.

     0769:         """

    +0770:         if not self._maybe_kill_before_start(exception):

      __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_maybe_kill_before_start(__pyx_v_self, __pyx_v_exception, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 770, __pyx_L1_error)
      __pyx_t_7 = (!__pyx_t_6);
      if (__pyx_t_7) {
    /* … */
      }

    +0771:             if self.ready():

        __pyx_t_7 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L1_error)
        if (__pyx_t_7) {
    /* … */
        }

    +0772:                 return

          __Pyx_XDECREF(__pyx_r);
          __pyx_r = Py_None; __Pyx_INCREF(Py_None);
          goto __pyx_L0;

     0773:

    +0774:             waiter = Waiter() if block else None # pylint:disable=undefined-variable

        __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 774, __pyx_L1_error)
        if (__pyx_t_7) {
          __pyx_t_4 = NULL;
          __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter);
          __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter);
          __pyx_t_5 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __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, 774, __pyx_L1_error)
            __Pyx_GOTREF((PyObject *)__pyx_t_2);
          }
          __pyx_t_1 = ((PyObject *)__pyx_t_2);
          __pyx_t_2 = 0;
        } else {
          __Pyx_INCREF(Py_None);
          __pyx_t_1 = Py_None;
        }
        __pyx_v_waiter = __pyx_t_1;
        __pyx_t_1 = 0;

    +0775:             hub = get_my_hub(self) # pylint:disable=undefined-variable

        __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_hub = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_1);
        __pyx_t_1 = 0;

    +0776:             hub.loop.run_callback(_kill, self, exception, waiter)

        __pyx_t_2 = __pyx_v_hub->loop;
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_kill_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_exception, __pyx_v_waiter};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_run_callback, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 776, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0777:             if waiter is not None:

        __pyx_t_7 = (__pyx_v_waiter != Py_None);
        if (__pyx_t_7) {
    /* … */
        }

    +0778:                 waiter.get()

          __pyx_t_3 = __pyx_v_waiter;
          __Pyx_INCREF(__pyx_t_3);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
            __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_get_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0779:                 self.join(timeout)

          __pyx_t_8.__pyx_n = 1;
          __pyx_t_8.timeout = __pyx_v_timeout;
          __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->join(__pyx_v_self, 0, &__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0780:

    +0781:     def get(self, block=True, timeout=None):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_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_17_gevent_cgreenlet_8Greenlet_34get, "Greenlet.get(self, block=True, timeout=None)\n\nget(block=True, timeout=None) -> object\n\nReturn the result the greenlet has returned or re-raise the\nexception it has raised.\n\nIf block is ``False``, raise :class:`gevent.Timeout` if the\ngreenlet is still alive. If block is ``True``, unschedule the\ncurrent greenlet until the result is available or the timeout\nexpires. In the latter case, :class:`gevent.Timeout` is\nraised.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_35get = {"get", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_35get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_34get};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_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 Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_block,&__pyx_mstate_global->__pyx_n_u_timeout,0};
      PyObject* values[2] = {0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 781, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 781, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 781, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get", 0) < 0) __PYX_ERR(0, 781, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 781, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 781, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_True));
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_block = values[0];
        __pyx_v_timeout = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("get", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 781, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_34get(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_block, __pyx_v_timeout);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_34get(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
      PyObject *__pyx_v_switch = NULL;
      PyObject *__pyx_v_t = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_6);
      __Pyx_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_switch);
      __Pyx_XDECREF(__pyx_v_t);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_35get, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_get, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[2]);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_get_2, __pyx_t_3) < 0) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    /* … */
      __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, Py_True, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 781, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

     0782:         """

     0783:         get(block=True, timeout=None) -> object

     0784:

     0785:         Return the result the greenlet has returned or re-raise the

     0786:         exception it has raised.

     0787:

     0788:         If block is ``False``, raise :class:`gevent.Timeout` if the

     0789:         greenlet is still alive. If block is ``True``, unschedule the

     0790:         current greenlet until the result is available or the timeout

     0791:         expires. In the latter case, :class:`gevent.Timeout` is

     0792:         raised.

     0793:         """

    +0794:         if self.ready():

      __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 794, __pyx_L1_error)
      if (__pyx_t_1) {
    /* … */
      }

    +0795:             if self.successful():

        __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->successful(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 795, __pyx_L1_error)
        if (__pyx_t_1) {
    /* … */
        }

    +0796:                 return self.value

          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_v_self->value);
          __pyx_r = __pyx_v_self->value;
          goto __pyx_L0;

    +0797:             self._raise_exception()

        __pyx_t_3 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_raise_exception, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0798:         if not block:

      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 798, __pyx_L1_error)
      __pyx_t_5 = (!__pyx_t_1);
      if (unlikely(__pyx_t_5)) {
    /* … */
      }

    +0799:             raise Timeout()

        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout);
        __pyx_t_6 = __pyx_v_6gevent_17_gevent_cgreenlet_Timeout;
        __pyx_t_4 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
          assert(__pyx_t_3);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
          __pyx_t_4 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __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, 799, __pyx_L1_error)

     0800:

    +0801:         switch = getcurrent().switch # pylint:disable=undefined-variable

      __pyx_t_2 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_getcurrent()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_switch); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_switch = __pyx_t_6;
      __pyx_t_6 = 0;

    +0802:         self.rawlink(switch)

      __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->rawlink(__pyx_v_self, __pyx_v_switch, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    +0803:         try:

      {
        /*try:*/ {
    /* … */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L11_try_end;
        __pyx_L6_error:;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    /* … */
        __pyx_L8_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L11_try_end:;
      }

    +0804:             t = Timeout._start_new_or_dummy(timeout)

          __pyx_t_2 = __pyx_v_6gevent_17_gevent_cgreenlet_Timeout;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_4 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_timeout};
            __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_start_new_or_dummy, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 804, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __pyx_v_t = __pyx_t_6;
          __pyx_t_6 = 0;

    +0805:             try:

          /*try:*/ {

    +0806:                 result = get_my_hub(self).switch() # pylint:disable=undefined-variable

            __pyx_t_6 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_6)->__pyx_vtab)->__pyx_switch(((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_6), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_v_result = __pyx_t_2;
            __pyx_t_2 = 0;

    +0807:                 if result is not self:

            __pyx_t_5 = (__pyx_v_result != ((PyObject *)__pyx_v_self));
            if (unlikely(__pyx_t_5)) {
    /* … */
            }
          }

    +0808:                     raise InvalidSwitchError('Invalid switch into Greenlet.get(): %r' % (result, ))

              __pyx_t_6 = NULL;
              __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError);
              __pyx_t_3 = __pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError;
              __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_result), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 808, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_switch_into_Greenlet_get, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 808, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_4 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
                assert(__pyx_t_6);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_6);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
                __pyx_t_4 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L13_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, 808, __pyx_L13_error)

     0809:             finally:

    +0810:                 t.cancel()

          /*finally:*/ {
            /*normal exit:*/{
              __pyx_t_3 = __pyx_v_t;
              __Pyx_INCREF(__pyx_t_3);
              __pyx_t_4 = 0;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L6_error)
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              goto __pyx_L14;
            }
            __pyx_L13_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
              if ( unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_18);
              __Pyx_XGOTREF(__pyx_t_19);
              __Pyx_XGOTREF(__pyx_t_20);
              __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
              {
                __pyx_t_3 = __pyx_v_t;
                __Pyx_INCREF(__pyx_t_3);
                __pyx_t_4 = 0;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                  __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L17_error)
                  __Pyx_GOTREF(__pyx_t_2);
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
              __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
              __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
              goto __pyx_L6_error;
              __pyx_L17_error:;
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
              goto __pyx_L6_error;
            }
            __pyx_L14:;
          }

    +0811:         except:

        /*except:*/ {
          __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_11) < 0) __PYX_ERR(0, 811, __pyx_L8_except_error)
          __Pyx_XGOTREF(__pyx_t_2);
          __Pyx_XGOTREF(__pyx_t_3);
          __Pyx_XGOTREF(__pyx_t_11);

     0812:             # unlinking in 'except' instead of finally is an optimization:

     0813:             # if switch occurred normally then link was already removed in _notify_links

     0814:             # and there's no need to touch the links set.

     0815:             # Note, however, that if "Invalid switch" assert was removed and invalid switch

     0816:             # did happen, the link would remain, causing another invalid switch later in this greenlet.

    +0817:             self.unlink(switch)

          __pyx_t_10 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_10);
          __pyx_t_4 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_switch};
            __pyx_t_6 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_unlink, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    +0818:             raise

          __Pyx_GIVEREF(__pyx_t_2);
          __Pyx_GIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_11);
          __pyx_t_2 = 0;  __pyx_t_3 = 0;  __pyx_t_11 = 0;
          __PYX_ERR(0, 818, __pyx_L8_except_error)
        }

     0819:

    +0820:         if self.ready():

      __pyx_t_5 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 820, __pyx_L1_error)
      if (__pyx_t_5) {
    /* … */
      }

    +0821:             if self.successful():

        __pyx_t_5 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->successful(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 821, __pyx_L1_error)
        if (__pyx_t_5) {
    /* … */
        }

    +0822:                 return self.value

          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_v_self->value);
          __pyx_r = __pyx_v_self->value;
          goto __pyx_L0;

    +0823:             self._raise_exception()

        __pyx_t_3 = ((PyObject *)__pyx_v_self);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_t_4 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_11 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_raise_exception, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

     0824:

    +0825:     def join(self, timeout=None):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_37join(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_17_gevent_cgreenlet_8Greenlet_join(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_17_gevent_cgreenlet_8Greenlet_join *__pyx_optional_args) {
      PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
      PyObject *__pyx_v_switch = NULL;
      PyObject *__pyx_v_t = NULL;
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_v_ex = NULL;
      PyObject *__pyx_r = NULL;
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_timeout = __pyx_optional_args->timeout;
        }
      }
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_37join)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_timeout};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __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_typedict_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
      }
    /* … */
      /* 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_XDECREF(__pyx_t_10);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_switch);
      __Pyx_XDECREF(__pyx_v_t);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_ex);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_37join(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_17_gevent_cgreenlet_8Greenlet_36join, "Greenlet.join(self, timeout=None)\n\njoin(timeout=None) -> None\n\nWait until the greenlet finishes or *timeout* expires. Return\n``None`` regardless.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_37join = {"join", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_37join, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_36join};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_37join(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 Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("join (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_timeout,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 825, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 825, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "join", 0) < 0) __PYX_ERR(0, 825, __pyx_L3_error)
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        } else {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 825, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_timeout = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("join", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 825, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_36join(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_timeout);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_36join(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_timeout) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 1;
      __pyx_t_2.timeout = __pyx_v_timeout;
      __pyx_t_1 = __pyx_vtabptr_6gevent_17_gevent_cgreenlet_Greenlet->join(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __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_cgreenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_37join, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_join, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3]);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_join, __pyx_t_3) < 0) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    /* … */
      __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 825, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);

     0826:         """

     0827:         join(timeout=None) -> None

     0828:

     0829:         Wait until the greenlet finishes or *timeout* expires. Return

     0830:         ``None`` regardless.

     0831:         """

    +0832:         if self.ready():

      __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L1_error)
      if (__pyx_t_6) {
    /* … */
      }

    +0833:             return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

     0834:

    +0835:         switch = getcurrent().switch # pylint:disable=undefined-variable

      __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_getcurrent()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_switch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_switch = __pyx_t_2;
      __pyx_t_2 = 0;

    +0836:         self.rawlink(switch)

      __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->rawlink(__pyx_v_self, __pyx_v_switch, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0837:         try:

      {
        /*try:*/ {
    /* … */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L9_try_end;
        __pyx_L4_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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;
    /* … */
        __pyx_L6_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L5_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        __pyx_L9_try_end:;
      }

    +0838:             t = Timeout._start_new_or_dummy(timeout)

          __pyx_t_1 = __pyx_v_6gevent_17_gevent_cgreenlet_Timeout;
          __Pyx_INCREF(__pyx_t_1);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_timeout};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_start_new_or_dummy, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __pyx_v_t = __pyx_t_2;
          __pyx_t_2 = 0;

    +0839:             try:

          /*try:*/ {

    +0840:                 result = get_my_hub(self).switch() # pylint:disable=undefined-variable

            __pyx_t_2 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_2)->__pyx_vtab)->__pyx_switch(((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_2), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L11_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;

    +0841:                 if result is not self:

            __pyx_t_6 = (__pyx_v_result != ((PyObject *)__pyx_v_self));
            if (unlikely(__pyx_t_6)) {
    /* … */
            }
          }

    +0842:                     raise InvalidSwitchError('Invalid switch into Greenlet.join(): %r' % (result, ))

              __pyx_t_2 = NULL;
              __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError);
              __pyx_t_4 = __pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError;
              __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_result), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Invalid_switch_into_Greenlet_joi, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 842, __pyx_L11_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_5 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_4))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
                assert(__pyx_t_2);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
                __pyx_t_5 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10};
                __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L11_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, 842, __pyx_L11_error)

     0843:             finally:

    +0844:                 t.cancel()

          /*finally:*/ {
            /*normal exit:*/{
              __pyx_t_4 = __pyx_v_t;
              __Pyx_INCREF(__pyx_t_4);
              __pyx_t_5 = 0;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L4_error)
                __Pyx_GOTREF(__pyx_t_1);
              }
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              goto __pyx_L12;
            }
            __pyx_L11_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 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_10); __pyx_t_10 = 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;
               __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
              if ( unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_14);
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_18);
              __Pyx_XGOTREF(__pyx_t_19);
              __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
              {
                __pyx_t_4 = __pyx_v_t;
                __Pyx_INCREF(__pyx_t_4);
                __pyx_t_5 = 0;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                  __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_1);
                }
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __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_14);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
              __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
              __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
              goto __pyx_L4_error;
              __pyx_L15_error:;
              __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_14); __pyx_t_14 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
              goto __pyx_L4_error;
            }
            __pyx_L12:;
          }

    +0845:         except Timeout as ex:

        __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout);
        if (__pyx_t_12) {
          __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_10) < 0) __PYX_ERR(0, 845, __pyx_L6_except_error)
          __Pyx_XGOTREF(__pyx_t_1);
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_4);
          __pyx_v_ex = __pyx_t_4;
          /*try:*/ {
    /* … */
          /*finally:*/ {
            /*normal exit:*/{
              __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
              goto __pyx_L22;
            }
            __pyx_L21_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
               __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
              if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_19);
              __Pyx_XGOTREF(__pyx_t_18);
              __Pyx_XGOTREF(__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_14);
              __pyx_t_12 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_20 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;
              }
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_14);
              __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ErrRestore(__pyx_t_19, __pyx_t_18, __pyx_t_17);
              __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0;
              __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_20;
              goto __pyx_L6_except_error;
            }
            __pyx_L22:;
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L5_exception_handled;
        }

    +0846:             self.unlink(switch)

            __pyx_t_3 = ((PyObject *)__pyx_v_self);
            __Pyx_INCREF(__pyx_t_3);
            __pyx_t_5 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_switch};
              __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_unlink, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L21_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0847:             if ex is not t:

            if (unlikely(!__pyx_v_t)) { __Pyx_RaiseUnboundLocalError("t"); __PYX_ERR(0, 847, __pyx_L21_error) }
            __pyx_t_6 = (__pyx_v_ex != __pyx_v_t);
            if (unlikely(__pyx_t_6)) {
    /* … */
            }
          }

    +0848:                 raise

              __Pyx_GIVEREF(__pyx_t_1);
              __Pyx_GIVEREF(__pyx_t_4);
              __Pyx_XGIVEREF(__pyx_t_10);
              __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_10);
              __pyx_t_1 = 0;  __pyx_t_4 = 0;  __pyx_t_10 = 0;
              __PYX_ERR(0, 848, __pyx_L21_error)

    +0849:         except:

        /*except:*/ {
          __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 849, __pyx_L6_except_error)
          __Pyx_XGOTREF(__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_1);

    +0850:             self.unlink(switch)

          __pyx_t_3 = ((PyObject *)__pyx_v_self);
          __Pyx_INCREF(__pyx_t_3);
          __pyx_t_5 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_switch};
            __pyx_t_2 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_unlink, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L6_except_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0851:             raise

          __Pyx_GIVEREF(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_4);
          __Pyx_XGIVEREF(__pyx_t_1);
          __Pyx_ErrRestoreWithState(__pyx_t_10, __pyx_t_4, __pyx_t_1);
          __pyx_t_10 = 0;  __pyx_t_4 = 0;  __pyx_t_1 = 0;
          __PYX_ERR(0, 851, __pyx_L6_except_error)
        }

     0852:

    +0853:     def __enter__(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_39__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_38__enter__, "Greenlet.__enter__(self)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_39__enter__ = {"__enter__", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_39__enter__, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_38__enter__};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_39__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_38__enter__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_38__enter__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_39__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet___enter, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_3) < 0) __PYX_ERR(0, 853, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0854:         return self

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __pyx_r = ((PyObject *)__pyx_v_self);
      goto __pyx_L0;

     0855:

    +0856:     def __exit__(self, t, v, tb):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_41__exit__(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_17_gevent_cgreenlet_8Greenlet_40__exit__, "Greenlet.__exit__(self, t, v, tb)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_41__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_41__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_40__exit__};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_41__exit__(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_t = 0;
      PyObject *__pyx_v_v = 0;
      PyObject *__pyx_v_tb = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_t,&__pyx_mstate_global->__pyx_n_u_v,&__pyx_mstate_global->__pyx_n_u_tb,0};
      PyObject* values[3] = {0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 856, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 856, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 856, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 856, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__exit__", 0) < 0) __PYX_ERR(0, 856, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, i); __PYX_ERR(0, 856, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 3)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 856, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 856, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 856, __pyx_L3_error)
        }
        __pyx_v_t = values[0];
        __pyx_v_v = values[1];
        __pyx_v_tb = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 856, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_40__exit__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_t, __pyx_v_v, __pyx_v_tb);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_40__exit__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_t, PyObject *__pyx_v_v, PyObject *__pyx_v_tb) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_12);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_41__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet___exit, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_3) < 0) __PYX_ERR(0, 856, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0857:         if t is None:

      __pyx_t_1 = (__pyx_v_t == Py_None);
      if (__pyx_t_1) {
    /* … */
        goto __pyx_L3;
      }

    +0858:             try:

        /*try:*/ {

    +0859:                 self.join()

          __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->join(__pyx_v_self, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }

     0860:             finally:

    +0861:                 self.kill()

        /*finally:*/ {
          /*normal exit:*/{
            __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->kill(__pyx_v_self, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 861, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L6;
          }
          __pyx_L5_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
            if ( unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_10);
            __Pyx_XGOTREF(__pyx_t_11);
            __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
            {
              __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->kill(__pyx_v_self, 0, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 861, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __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);
            __Pyx_XGIVEREF(__pyx_t_6);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
            __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
            __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
            goto __pyx_L1_error;
            __pyx_L8_error:;
            __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);
            __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;
            __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
            goto __pyx_L1_error;
          }
          __pyx_L6:;
        }

     0862:         else:

    +0863:             self.kill((t, v, tb))

      /*else*/ {
        __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_v_t);
        __Pyx_GIVEREF(__pyx_v_t);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_t) != (0)) __PYX_ERR(0, 863, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_v);
        __Pyx_GIVEREF(__pyx_v_v);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_v) != (0)) __PYX_ERR(0, 863, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_tb);
        __Pyx_GIVEREF(__pyx_v_tb);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_tb) != (0)) __PYX_ERR(0, 863, __pyx_L1_error);
        __pyx_t_13.__pyx_n = 1;
        __pyx_t_13.exception = __pyx_t_2;
        __pyx_t_12 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->kill(__pyx_v_self, 0, &__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 863, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __pyx_L3:;

     0864:

    +0865:     def __report_result(self, result):

    static CYTHON_INLINE PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_result(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_result) {
      struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_hub = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_cgreenlet.Greenlet._Greenlet__report_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_hub);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0866:         self._exc_info = (None, None, None)

      __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[0]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);
      __Pyx_GOTREF(__pyx_v_self->_exc_info);
      __Pyx_DECREF(__pyx_v_self->_exc_info);
      __pyx_v_self->_exc_info = __pyx_mstate_global->__pyx_tuple[0];
    /* … */
      __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 866, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

    +0867:         self.value = result

      __Pyx_INCREF(__pyx_v_result);
      __Pyx_GIVEREF(__pyx_v_result);
      __Pyx_GOTREF(__pyx_v_self->value);
      __Pyx_DECREF(__pyx_v_self->value);
      __pyx_v_self->value = __pyx_v_result;

    +0868:         if self._links and not self._notifier:

      __pyx_t_2 = (__pyx_v_self->_links != Py_None)&&(__Pyx_PyList_GET_SIZE(__pyx_v_self->_links) != 0);
      if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_2 < 0))) __PYX_ERR(0, 868, __pyx_L1_error)
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L4_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_notifier); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 868, __pyx_L1_error)
      __pyx_t_3 = (!__pyx_t_2);
      __pyx_t_1 = __pyx_t_3;
      __pyx_L4_bool_binop_done:;
      if (__pyx_t_1) {
    /* … */
      }

    +0869:             hub = get_my_hub(self) # pylint:disable=undefined-variable

        __pyx_t_4 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 869, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_v_hub = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_4);
        __pyx_t_4 = 0;

    +0870:             self._notifier = hub.loop.run_callback(self._notify_links)

        __pyx_t_5 = __pyx_v_hub->loop;
        __Pyx_INCREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_notify_links); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 870, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_run_callback, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_GIVEREF(__pyx_t_4);
        __Pyx_GOTREF(__pyx_v_self->_notifier);
        __Pyx_DECREF(__pyx_v_self->_notifier);
        __pyx_v_self->_notifier = __pyx_t_4;
        __pyx_t_4 = 0;

     0871:

    +0872:     def __report_error(self, exc_info):

    static CYTHON_INLINE PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_error(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_exc_info) {
      PyObject *__pyx_v_tb = NULL;
      struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_hub = NULL;
      PyObject *__pyx_r = NULL;
      __Pyx_INCREF(__pyx_v_exc_info);
    /* … */
      /* 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_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._Greenlet__report_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_tb);
      __Pyx_XDECREF((PyObject *)__pyx_v_hub);
      __Pyx_XDECREF(__pyx_v_exc_info);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +0873:         if isinstance(exc_info[1], GreenletExit):

      if (unlikely(__pyx_v_exc_info == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 873, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = PyObject_IsInstance(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 873, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_3) {
    /* … */
      }

    +0874:             self.__report_result(exc_info[1])

        if (unlikely(__pyx_v_exc_info == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 874, __pyx_L1_error)
        }
        __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_result(__pyx_v_self, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __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;

    +0875:             return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

     0876:

     0877:         # Depending on the error, we may not be able to pickle it.

     0878:         # In particular, RecursionError can be a problem.

    +0879:         try:

      {
        /*try:*/ {
    /* … */
        }
        __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;
        goto __pyx_L9_try_end;
        __pyx_L4_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    /* … */
        __pyx_L6_except_error:;
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        goto __pyx_L1_error;
        __pyx_L5_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
        __pyx_L9_try_end:;
      }

    +0880:             tb = dump_traceback(exc_info[2])

          __pyx_t_2 = NULL;
          __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_dump_traceback);
          __pyx_t_7 = __pyx_v_6gevent_17_gevent_cgreenlet_dump_traceback;
          if (unlikely(__pyx_v_exc_info == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 880, __pyx_L4_error)
          }
          __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 880, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
            assert(__pyx_t_2);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
            __pyx_t_9 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_8};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_1);
          }
          __pyx_v_tb = __pyx_t_1;
          __pyx_t_1 = 0;

    +0881:         except: # pylint:disable=bare-except

        /*except:*/ {
          __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._Greenlet__report_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 881, __pyx_L6_except_error)
          __Pyx_XGOTREF(__pyx_t_1);
          __Pyx_XGOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_8);

    +0882:             tb = None

          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_tb, Py_None);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L5_exception_handled;
        }

    +0883:         self._exc_info = exc_info[0], exc_info[1], tb

      if (unlikely(__pyx_v_exc_info == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 883, __pyx_L1_error)
      }
      __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely(__pyx_v_exc_info == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 883, __pyx_L1_error)
      }
      __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 883, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 883, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_tb);
      __Pyx_GIVEREF(__pyx_v_tb);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_tb) != (0)) __PYX_ERR(0, 883, __pyx_L1_error);
      __pyx_t_8 = 0;
      __pyx_t_7 = 0;
      __Pyx_GIVEREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_v_self->_exc_info);
      __Pyx_DECREF(__pyx_v_self->_exc_info);
      __pyx_v_self->_exc_info = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

     0884:

    +0885:         hub = get_my_hub(self) # pylint:disable=undefined-variable

      __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_hub = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_1);
      __pyx_t_1 = 0;

    +0886:         if self._links and not self._notifier:

      __pyx_t_10 = (__pyx_v_self->_links != Py_None)&&(__Pyx_PyList_GET_SIZE(__pyx_v_self->_links) != 0);
      if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_10 < 0))) __PYX_ERR(0, 886, __pyx_L1_error)
      if (__pyx_t_10) {
      } else {
        __pyx_t_3 = __pyx_t_10;
        goto __pyx_L13_bool_binop_done;
      }
      __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_self->_notifier); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 886, __pyx_L1_error)
      __pyx_t_11 = (!__pyx_t_10);
      __pyx_t_3 = __pyx_t_11;
      __pyx_L13_bool_binop_done:;
      if (__pyx_t_3) {
    /* … */
      }

    +0887:             self._notifier = hub.loop.run_callback(self._notify_links)

        __pyx_t_7 = __pyx_v_hub->loop;
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_notify_links); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 887, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_run_callback, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_v_self->_notifier);
        __Pyx_DECREF(__pyx_v_self->_notifier);
        __pyx_v_self->_notifier = __pyx_t_1;
        __pyx_t_1 = 0;

     0888:

    +0889:         try:

      /*try:*/ {

    +0890:             hub.handle_error(self, *exc_info)

        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_hub), __pyx_mstate_global->__pyx_n_u_handle_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 890, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF((PyObject *)__pyx_v_self);
        __Pyx_GIVEREF((PyObject *)__pyx_v_self);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 890, __pyx_L16_error);
        if (unlikely(__pyx_v_exc_info == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
          __PYX_ERR(0, 890, __pyx_L16_error)
        }
        __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_v_exc_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 890, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 890, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }

     0891:         finally:

    +0892:             del exc_info

      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_DECREF(__pyx_v_exc_info); __pyx_v_exc_info = 0;
          goto __pyx_L17;
        }
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 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_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          if ( unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_5);
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          __pyx_t_12 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_exc_info); __pyx_v_exc_info = 0;
          }
          __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_6);
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_4);
          __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14;
          goto __pyx_L1_error;
        }
        __pyx_L17:;
      }

     0893:

    +0894:     def run(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_43run(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_42run, "Greenlet.run(self)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_43run = {"run", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_43run, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_42run};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_43run(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("run (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_42run(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_42run(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_v_result = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.run", __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;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_43run, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_run, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_run, __pyx_t_3) < 0) __PYX_ERR(0, 894, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0895:         try:

      /*try:*/ {

    +0896:             self.__cancel_start()

        __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__cancel_start(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0897:             self._start_event = _start_completed_event

        __Pyx_INCREF((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__start_completed_event);
        __Pyx_GIVEREF((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__start_completed_event);
        __Pyx_GOTREF(__pyx_v_self->_start_event);
        __Pyx_DECREF(__pyx_v_self->_start_event);
        __pyx_v_self->_start_event = ((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__start_completed_event);

     0898:

    +0899:             try:

        {
          /*try:*/ {
    /* … */
          }
    /* … */
          __pyx_L8_except_error:;
          __Pyx_XGIVEREF(__pyx_t_2);
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
          goto __pyx_L4_error;
          __pyx_L7_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_2);
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_4);
          __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
          __pyx_L11_try_end:;
        }
      }

    +0900:                 result = self._run(*self.args, **self.kwargs)

            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_run_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 900, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (unlikely(__pyx_v_self->args == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
              __PYX_ERR(0, 900, __pyx_L6_error)
            }
            if (unlikely(__pyx_v_self->kwargs == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
              __PYX_ERR(0, 900, __pyx_L6_error)
            }
            __pyx_t_5 = PyDict_Copy(__pyx_v_self->kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 900, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_self->args, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 900, __pyx_L6_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_v_result = __pyx_t_6;
            __pyx_t_6 = 0;

    +0901:             except: # pylint:disable=bare-except

          /*except:*/ {
            __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.run", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 901, __pyx_L8_except_error)
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_5);
            __Pyx_XGOTREF(__pyx_t_1);

    +0902:                 self.__report_error(sys_exc_info())

            __pyx_t_8 = NULL;
            __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);
            __pyx_t_9 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info;
            __pyx_t_10 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
              assert(__pyx_t_8);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
              __pyx_t_10 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
              __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 902, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_7);
            }
            if (!(likely(PyTuple_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_7))) __PYX_ERR(0, 902, __pyx_L8_except_error)
            __pyx_t_9 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_error(__pyx_v_self, ((PyObject*)__pyx_t_7)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 902, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L7_exception_handled;
          }

     0903:             else:

    +0904:                 self.__report_result(result)

          /*else:*/ {
            __pyx_t_6 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_result(__pyx_v_self, __pyx_v_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L8_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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;
          goto __pyx_L11_try_end;
          __pyx_L6_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

     0905:         finally:

    +0906:             self.__free()

      /*finally:*/ {
        /*normal exit:*/{
          __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L1_error)
          goto __pyx_L5;
        }
        __pyx_L4_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 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_5); __pyx_t_5 = 0;
          __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;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
           __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          if ( unlikely(__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0)) __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2);
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_3);
          __Pyx_XGOTREF(__pyx_t_2);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
          {
            __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free(__pyx_v_self); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L15_error)
          }
          __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_4);
          __Pyx_XGIVEREF(__pyx_t_3);
          __Pyx_XGIVEREF(__pyx_t_2);
          __Pyx_ErrRestore(__pyx_t_4, __pyx_t_3, __pyx_t_2);
          __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
          goto __pyx_L1_error;
          __pyx_L15_error:;
          __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_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
          goto __pyx_L1_error;
        }
        __pyx_L5:;
      }

     0907:

    +0908:     def __free(self):

    static CYTHON_INLINE void __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
    /* … */
      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._Greenlet__free", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
    }

    +0909:         try:

      {
        /*try:*/ {
    /* … */
        }
        __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_L5_except_error:;
        __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:;
      }

     0910:             # It seems that Cython 0.29.13 sometimes miscompiles

     0911:             # self.__dict__.pop('_run', None) ? When we moved this out of the

     0912:             # inline finally: block in run(), we started getting strange

     0913:             # exceptions from places that subclassed Greenlet.

    +0914:             del self._run

          if (__Pyx_PyObject_DelAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_run_2) < 0) __PYX_ERR(0, 914, __pyx_L3_error)

    +0915:         except AttributeError:

        __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
        if (__pyx_t_4) {
          __Pyx_ErrRestore(0,0,0);
          goto __pyx_L4_exception_handled;
        }
        goto __pyx_L5_except_error;

     0916:             pass

    +0917:         self.args = ()

      __Pyx_INCREF(__pyx_mstate_global->__pyx_empty_tuple);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_empty_tuple);
      __Pyx_GOTREF(__pyx_v_self->args);
      __Pyx_DECREF(__pyx_v_self->args);
      __pyx_v_self->args = __pyx_mstate_global->__pyx_empty_tuple;

    +0918:         self.kwargs.clear()

      if (unlikely(__pyx_v_self->kwargs == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear");
        __PYX_ERR(0, 918, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_PyDict_Clear(__pyx_v_self->kwargs); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 918, __pyx_L1_error)

     0919:

    +0920:     def _run(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_45_run(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_44_run, "Greenlet._run(self)\n\nSubclasses may override this method to take any number of\narguments and keyword arguments.\n\n.. versionadded:: 1.1a3\n    Previously, if no callable object was\n    passed to the constructor, the spawned greenlet would later\n    fail with an AttributeError.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_45_run = {"_run", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_45_run, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_44_run};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_45_run(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_run (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_44_run(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_44_run(CYTHON_UNUSED struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_45_run, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet__run, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_run_2, __pyx_t_3) < 0) __PYX_ERR(0, 920, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0921:         """

     0922:         Subclasses may override this method to take any number of

     0923:         arguments and keyword arguments.

     0924:

     0925:         .. versionadded:: 1.1a3

     0926:             Previously, if no callable object was

     0927:             passed to the constructor, the spawned greenlet would later

     0928:             fail with an AttributeError.

     0929:         """

     0930:         # We usually override this in __init__

     0931:         # pylint: disable=method-hidden

    +0932:         return

      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

     0933:

    +0934:     def has_links(self):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_47has_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static int __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_has_links(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) {
      int __pyx_r;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_has_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_47has_links)) {
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 934, __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_typedict_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
      }
    /* … */
      /* 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_cgreenlet.Greenlet.has_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_47has_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_46has_links, "Greenlet.has_links(self) -> bool");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_47has_links = {"has_links", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_47has_links, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_46has_links};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_47has_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("has_links (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_46has_links(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_46has_links(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_has_links(__pyx_v_self, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.has_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_47has_links, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_has_links, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 934, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_has_links, __pyx_t_3) < 0) __PYX_ERR(0, 934, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0935:         return len(self._links)

      __pyx_t_1 = __pyx_v_self->_links;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 935, __pyx_L1_error)
      }
      __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 935, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_7;
      goto __pyx_L0;

     0936:

    +0937:     def rawlink(self, callback):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_rawlink(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback, int __pyx_skip_dispatch) {
      struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *__pyx_v_hub = NULL;
      PyObject *__pyx_r = NULL;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_rawlink); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_callback};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 937, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __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_typedict_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
      }
    /* … */
      /* 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_XDECREF(__pyx_t_8);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.rawlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF((PyObject *)__pyx_v_hub);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_48rawlink, "Greenlet.rawlink(self, callback)\n\nRegister a callable to be executed when the greenlet finishes\nexecution.\n\nThe *callback* will be called with this instance as an\nargument.\n\nThe *callback* will be called even if linked after the greenlet\nis already ready().\n\n.. caution::\n    The *callback* will be called in the hub and\n    **MUST NOT** raise an exception.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink = {"rawlink", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink, METH_O, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_48rawlink};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("rawlink (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_48rawlink(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_48rawlink(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_rawlink(__pyx_v_self, __pyx_v_callback, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 937, __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_cgreenlet.Greenlet.rawlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_rawlink, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_rawlink, __pyx_t_3) < 0) __PYX_ERR(0, 937, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0938:         """

     0939:         Register a callable to be executed when the greenlet finishes

     0940:         execution.

     0941:

     0942:         The *callback* will be called with this instance as an

     0943:         argument.

     0944:

     0945:         The *callback* will be called even if linked after the greenlet

     0946:         is already ready().

     0947:

     0948:         .. caution::

     0949:             The *callback* will be called in the hub and

     0950:             **MUST NOT** raise an exception.

     0951:         """

    +0952:         if not callable(callback):

      __pyx_t_6 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 952, __pyx_L1_error)
      __pyx_t_7 = (!__pyx_t_6);
      if (unlikely(__pyx_t_7)) {
    /* … */
      }

    +0953:             raise TypeError('Expected callable: %r' % (callback, ))

        __pyx_t_2 = NULL;
        __Pyx_INCREF(__pyx_builtin_TypeError);
        __pyx_t_4 = __pyx_builtin_TypeError;
        __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_callback), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Expected_callable, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __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, 953, __pyx_L1_error)

    +0954:         self._links.append(callback) # pylint:disable=no-member

      if (unlikely(__pyx_v_self->_links == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
        __PYX_ERR(0, 954, __pyx_L1_error)
      }
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_self->_links, __pyx_v_callback); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 954, __pyx_L1_error)

    +0955:         if self.ready() and self._links and not self._notifier:

      __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 955, __pyx_L1_error)
      if (__pyx_t_6) {
      } else {
        __pyx_t_7 = __pyx_t_6;
        goto __pyx_L5_bool_binop_done;
      }
      __pyx_t_6 = (__pyx_v_self->_links != Py_None)&&(__Pyx_PyList_GET_SIZE(__pyx_v_self->_links) != 0);
      if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 955, __pyx_L1_error)
      if (__pyx_t_6) {
      } else {
        __pyx_t_7 = __pyx_t_6;
        goto __pyx_L5_bool_binop_done;
      }
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->_notifier); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 955, __pyx_L1_error)
      __pyx_t_10 = (!__pyx_t_6);
      __pyx_t_7 = __pyx_t_10;
      __pyx_L5_bool_binop_done:;
      if (__pyx_t_7) {
    /* … */
      }

    +0956:             hub = get_my_hub(self) # pylint:disable=undefined-variable

        __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_v_hub = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_1);
        __pyx_t_1 = 0;

    +0957:             self._notifier = hub.loop.run_callback(self._notify_links)

        __pyx_t_4 = __pyx_v_hub->loop;
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_notify_links); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 957, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_5 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_run_callback, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_GIVEREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_v_self->_notifier);
        __Pyx_DECREF(__pyx_v_self->_notifier);
        __pyx_v_self->_notifier = __pyx_t_1;
        __pyx_t_1 = 0;

     0958:

    +0959:     def link(self, callback, SpawnedLink=SpawnedLink):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_51link(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_17_gevent_cgreenlet_8Greenlet_50link, "Greenlet.link(self, callback, SpawnedLink=SpawnedLink)\n\nLink greenlet's completion to a callable.\n\nThe *callback* will be called with this instance as an\nargument once this greenlet is dead. A callable is called in\nits own :class:`greenlet.greenlet` (*not* a\n:class:`Greenlet`).\n\nThe *callback* will be called even if linked after the greenlet\nis already ready().");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_51link = {"link", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_51link, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_50link};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_51link(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_callback = 0;
      PyObject *__pyx_v_SpawnedLink = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("link (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_SpawnedLink,0};
      PyObject* values[2] = {0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 959, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 959, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 959, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "link", 0) < 0) __PYX_ERR(0, 959, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__13);
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("link", 0, 1, 2, i); __PYX_ERR(0, 959, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 959, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 959, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__13);
        }
        __pyx_v_callback = values[0];
        __pyx_v_SpawnedLink = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("link", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 959, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.link", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_50link(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_callback, __pyx_v_SpawnedLink);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_50link(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_SpawnedLink) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_cgreenlet.Greenlet.link", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);
      __pyx_mstate_global->__pyx_k__13 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);
      __pyx_t_3 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_51link, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_link, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_link, __pyx_t_5) < 0) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0960:         """

     0961:         Link greenlet's completion to a callable.

     0962:

     0963:         The *callback* will be called with this instance as an

     0964:         argument once this greenlet is dead. A callable is called in

     0965:         its own :class:`greenlet.greenlet` (*not* a

     0966:         :class:`Greenlet`).

     0967:

     0968:         The *callback* will be called even if linked after the greenlet

     0969:         is already ready().

     0970:         """

     0971:         # XXX: Is the redefinition of SpawnedLink supposed to just be an

     0972:         # optimization, or do people use it? It's not documented

     0973:         # pylint:disable=redefined-outer-name

    +0974:         self.rawlink(SpawnedLink(callback))

      __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_v_SpawnedLink);
      __pyx_t_3 = __pyx_v_SpawnedLink;
      __pyx_t_4 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
        __pyx_t_4 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_callback};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->rawlink(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 974, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0975:

    +0976:     def unlink(self, callback):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_53unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_52unlink, "Greenlet.unlink(self, callback)\n\nRemove the callback set by :meth:`link` or :meth:`rawlink`");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_53unlink = {"unlink", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_53unlink, METH_O, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_52unlink};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_53unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("unlink (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_52unlink(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_52unlink(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_AddTraceback("gevent._gevent_cgreenlet.Greenlet.unlink", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_53unlink, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_unlink, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_unlink, __pyx_t_5) < 0) __PYX_ERR(0, 976, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0977:         """Remove the callback set by :meth:`link` or :meth:`rawlink`"""

    +0978:         try:

      {
        /*try:*/ {
    /* … */
        }
        __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_L5_except_error:;
        __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:;
      }

    +0979:             self._links.remove(callback) # pylint:disable=no-member

          __pyx_t_5 = __pyx_v_self->_links;
          __Pyx_INCREF(__pyx_t_5);
          __pyx_t_6 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_callback};
            __pyx_t_4 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 979, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_4);
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +0980:         except ValueError:

        __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;

     0981:             pass

     0982:

    +0983:     def unlink_all(self):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_55unlink_all(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_54unlink_all, "Greenlet.unlink_all(self)\n\nRemove all the callbacks.\n\n.. versionadded:: 1.3a2");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_55unlink_all = {"unlink_all", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_55unlink_all, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_54unlink_all};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_55unlink_all(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("unlink_all (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_54unlink_all(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_54unlink_all(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.unlink_all", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_55unlink_all, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_unlink_all, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_unlink_all, __pyx_t_5) < 0) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     0984:         """

     0985:         Remove all the callbacks.

     0986:

     0987:         .. versionadded:: 1.3a2

     0988:         """

    +0989:         del self._links[:]

      if (unlikely(__pyx_v_self->_links == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 989, __pyx_L1_error)
      }
      if (__Pyx_PyObject_DelSlice(__pyx_v_self->_links, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 989, __pyx_L1_error)

     0990:

    +0991:     def link_value(self, callback, SpawnedLink=SuccessSpawnedLink):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_57link_value(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_17_gevent_cgreenlet_8Greenlet_56link_value, "Greenlet.link_value(self, callback, SpawnedLink=SuccessSpawnedLink)\n\nLike :meth:`link` but *callback* is only notified when the greenlet\nhas completed successfully.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_57link_value = {"link_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_57link_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_56link_value};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_57link_value(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_callback = 0;
      PyObject *__pyx_v_SpawnedLink = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("link_value (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_SpawnedLink,0};
      PyObject* values[2] = {0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 991, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 991, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 991, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "link_value", 0) < 0) __PYX_ERR(0, 991, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__14);
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("link_value", 0, 1, 2, i); __PYX_ERR(0, 991, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 991, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 991, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__14);
        }
        __pyx_v_callback = values[0];
        __pyx_v_SpawnedLink = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("link_value", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 991, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.link_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_56link_value(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_callback, __pyx_v_SpawnedLink);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_56link_value(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_SpawnedLink) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_4);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.link_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);
      __pyx_mstate_global->__pyx_k__14 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);
      __pyx_t_5 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_57link_value, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_link_value, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 991, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_link_value, __pyx_t_3) < 0) __PYX_ERR(0, 991, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0992:         """

     0993:         Like :meth:`link` but *callback* is only notified when the greenlet

     0994:         has completed successfully.

     0995:         """

     0996:         # pylint:disable=redefined-outer-name

    +0997:         self.link(callback, SpawnedLink=SpawnedLink)

      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_callback};
        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_SpawnedLink, __pyx_v_SpawnedLink, __pyx_t_4, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 997, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_link, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0998:

    +0999:     def link_exception(self, callback, SpawnedLink=FailureSpawnedLink):

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_59link_exception(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_17_gevent_cgreenlet_8Greenlet_58link_exception, "Greenlet.link_exception(self, callback, SpawnedLink=FailureSpawnedLink)\n\nLike :meth:`link` but *callback* is only notified when the\ngreenlet dies because of an unhandled exception.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_59link_exception = {"link_exception", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_59link_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_58link_exception};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_59link_exception(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_callback = 0;
      PyObject *__pyx_v_SpawnedLink = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("link_exception (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_SpawnedLink,0};
      PyObject* values[2] = {0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 999, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 999, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 999, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "link_exception", 0) < 0) __PYX_ERR(0, 999, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__15);
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("link_exception", 0, 1, 2, i); __PYX_ERR(0, 999, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 999, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 999, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(__pyx_mstate_global->__pyx_k__15);
        }
        __pyx_v_callback = values[0];
        __pyx_v_SpawnedLink = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("link_exception", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 999, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.link_exception", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_58link_exception(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self), __pyx_v_callback, __pyx_v_SpawnedLink);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_58link_exception(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_SpawnedLink) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_4);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.link_exception", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);
      __pyx_mstate_global->__pyx_k__15 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);
      __pyx_t_3 = PyTuple_Pack(1, ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_59link_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet_link_exception, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_link_exception, __pyx_t_5) < 0) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     1000:         """

     1001:         Like :meth:`link` but *callback* is only notified when the

     1002:         greenlet dies because of an unhandled exception.

     1003:         """

     1004:         # pylint:disable=redefined-outer-name

    +1005:         self.link(callback, SpawnedLink=SpawnedLink)

      __pyx_t_2 = ((PyObject *)__pyx_v_self);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_callback};
        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_SpawnedLink, __pyx_v_SpawnedLink, __pyx_t_4, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)
        __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder(__pyx_mstate_global->__pyx_n_u_link, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1006:

    +1007:     def _notify_links(self):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__notify_links(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) {
      PyObject *__pyx_v_link = NULL;
      PyObject *__pyx_r = NULL;
      /* Check if called by wrapper */
      if (unlikely(__pyx_skip_dispatch)) ;
      /* Check if overridden in Python */
      else if (
      #if !CYTHON_USE_TYPE_SLOTS
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet &&
      __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC))
      #else
      unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))
      #endif
      ) {
        #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_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
          #endif
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_notify_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links)) {
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = NULL;
            __Pyx_INCREF(__pyx_t_1);
            __pyx_t_4 = __pyx_t_1;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_3);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
            }
            __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_typedict_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
      }
    /* … */
      /* 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_XDECREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._notify_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_link);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_60_notify_links, "Greenlet._notify_links(self)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links = {"_notify_links", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_8Greenlet_60_notify_links};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_notify_links (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_60_notify_links(((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_60_notify_links(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__notify_links(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __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_cgreenlet.Greenlet._notify_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Greenlet__notify_links, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_mstate_global->__pyx_n_u_notify_links, __pyx_t_5) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +1008:         while self._links:

      while (1) {
        __pyx_t_6 = (__pyx_v_self->_links != Py_None)&&(__Pyx_PyList_GET_SIZE(__pyx_v_self->_links) != 0);
        if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_6 < 0))) __PYX_ERR(0, 1008, __pyx_L1_error)
        if (!__pyx_t_6) break;

     1009:             # Early links are allowed to remove later links

     1010:             # before we get to them, and they're also allowed to

     1011:             # add new links, so we have to be careful about iterating.

     1012:

     1013:             # We don't expect this list to be very large, so the time spent

     1014:             # manipulating it should be small. a deque is probably not justified.

     1015:             # Cython has optimizations to transform this into a memmove anyway.

    +1016:             link = self._links.pop(0)

        if (unlikely(__pyx_v_self->_links == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
          __PYX_ERR(0, 1016, __pyx_L1_error)
        }
        __pyx_t_1 = __Pyx_PyList_PopIndex(__pyx_v_self->_links, __pyx_mstate_global->__pyx_int_0, 0, 1, Py_ssize_t, PyLong_FromSsize_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_1);
        __pyx_t_1 = 0;

    +1017:             try:

        {
          /*try:*/ {
    /* … */
          }
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          goto __pyx_L12_try_end;
          __pyx_L5_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;
    /* … */
          __pyx_L7_except_error:;
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          goto __pyx_L1_error;
          __pyx_L6_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
          __pyx_L12_try_end:;
        }
      }

    +1018:                 link(self)

            __pyx_t_2 = NULL;
            __Pyx_INCREF(__pyx_v_link);
            __pyx_t_4 = __pyx_v_link;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_4))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
              assert(__pyx_t_2);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)};
              __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L5_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1019:             except: # pylint:disable=bare-except, undefined-variable

          /*except:*/ {
            __Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet._notify_links", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 1019, __pyx_L7_except_error)
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_4);
            __Pyx_XGOTREF(__pyx_t_2);

    +1020:                 get_my_hub(self).handle_error((link, self), *sys_exc_info())

            __pyx_t_3 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_self))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_handle_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1020, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_INCREF(__pyx_v_link);
            __Pyx_GIVEREF(__pyx_v_link);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_link) != (0)) __PYX_ERR(0, 1020, __pyx_L7_except_error);
            __Pyx_INCREF((PyObject *)__pyx_v_self);
            __Pyx_GIVEREF((PyObject *)__pyx_v_self);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)) != (0)) __PYX_ERR(0, 1020, __pyx_L7_except_error);
            __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1020, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 1020, __pyx_L7_except_error);
            __pyx_t_3 = 0;
            __pyx_t_12 = NULL;
            __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);
            __pyx_t_13 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info;
            __pyx_t_5 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_13))) {
              __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
              assert(__pyx_t_12);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_13, __pyx__function);
              __pyx_t_5 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L7_except_error)
              __Pyx_GOTREF(__pyx_t_3);
            }
            __pyx_t_13 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1020, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = PyNumber_Add(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1020, __pyx_L7_except_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L6_exception_handled;
          }

     1021:

     1022:

    +1023: class _dummy_event(object):

    struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet__dummy_event {
      PyObject *(*stop)(struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *, int __pyx_skip_dispatch);
      PyObject *(*start)(struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *, PyObject *, int __pyx_skip_dispatch);
      PyObject *(*close)(struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *, int __pyx_skip_dispatch);
    };
    static struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet__dummy_event *__pyx_vtabptr_6gevent_17_gevent_cgreenlet__dummy_event;

    +1024:     __slots__ = ('pending', 'active')

      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event, __pyx_mstate_global->__pyx_n_u_slots, __pyx_mstate_global->__pyx_tuple[4]) < 0) __PYX_ERR(0, 1024, __pyx_L1_error)
    /* … */
      __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_pending, __pyx_mstate_global->__pyx_n_u_active); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 1024, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]);

     1025:

    +1026:     def __init__(self):

    /* Python wrapper */
    static int __pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    static int __pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      int __pyx_r;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
      #endif
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1; }
      const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
      if (unlikely(__pyx_kwds_len < 0)) return -1;
      if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__init__", __pyx_kwds); return -1;}
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_12_dummy_event___init__(((struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *)__pyx_v_self));

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

    static int __pyx_pf_6gevent_17_gevent_cgreenlet_12_dummy_event___init__(struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *__pyx_v_self) {
      int __pyx_r;
    /* … */
      /* function exit code */
      __pyx_r = 0;
      return __pyx_r;
    }

    +1027:         self.pending = self.active = False

      __pyx_v_self->pending = 0;
      __pyx_v_self->active = 0;

     1028:

    +1029:     def stop(self):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_12_dummy_event_stop(CYTHON_UNUSED struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_12_dummy_event_2stop, "_dummy_event.stop(self)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_3stop = {"stop", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_3stop, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_12_dummy_event_2stop};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("stop (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_12_dummy_event_2stop(((struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_12_dummy_event_2stop(struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_12_dummy_event_stop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __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_cgreenlet._dummy_event.stop", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_3stop, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_dummy_event_stop, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event, __pyx_mstate_global->__pyx_n_u_stop, __pyx_t_5) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     1030:         pass

     1031:

    +1032:     def start(self, cb): # pylint:disable=unused-argument

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_5start(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_12_dummy_event_start(CYTHON_UNUSED struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_cb, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_cgreenlet._dummy_event.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_5start(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_12_dummy_event_4start, "_dummy_event.start(self, cb)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_5start = {"start", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_5start, METH_O, __pyx_doc_6gevent_17_gevent_cgreenlet_12_dummy_event_4start};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_5start(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("start (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_12_dummy_event_4start(((struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *)__pyx_v_self), ((PyObject *)__pyx_v_cb));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_12_dummy_event_4start(struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *__pyx_v_self, PyObject *__pyx_v_cb) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_12_dummy_event_start(__pyx_v_self, __pyx_v_cb, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __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_cgreenlet._dummy_event.start", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_dummy_event_start, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1032, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_5) < 0) __PYX_ERR(0, 1032, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +1033:         raise AssertionError("Cannot start the dummy event")

      __pyx_t_2 = NULL;
      __Pyx_INCREF(__pyx_builtin_AssertionError);
      __pyx_t_3 = __pyx_builtin_AssertionError;
      __pyx_t_4 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Cannot_start_the_dummy_event};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __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, 1033, __pyx_L1_error)

     1034:

    +1035:     def close(self):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet_12_dummy_event_close(CYTHON_UNUSED struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;

      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    PyDoc_STRVAR(__pyx_doc_6gevent_17_gevent_cgreenlet_12_dummy_event_6close, "_dummy_event.close(self)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_7close = {"close", (PyCFunction)__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_7close, METH_NOARGS, __pyx_doc_6gevent_17_gevent_cgreenlet_12_dummy_event_6close};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_12_dummy_event_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("close (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_12_dummy_event_6close(((struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *)__pyx_v_self));

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

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_12_dummy_event_6close(struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *__pyx_v_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_12_dummy_event_close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __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_cgreenlet._dummy_event.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_7close, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_dummy_event_close, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1035, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event, __pyx_mstate_global->__pyx_n_u_close, __pyx_t_5) < 0) __PYX_ERR(0, 1035, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     1036:         pass

     1037:

    +1038: _cancelled_start_event = _dummy_event()

      __pyx_t_3 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event);
      __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1038, __pyx_L1_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_5);
      }
      __Pyx_XGOTREF((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__cancelled_start_event);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet__cancelled_start_event, ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *)__pyx_t_5));
      __Pyx_GIVEREF((PyObject *)__pyx_t_5);
      __pyx_t_5 = 0;

    +1039: _start_completed_event = _dummy_event()

      __pyx_t_2 = NULL;
      __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event);
      __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1039, __pyx_L1_error)
        __Pyx_GOTREF((PyObject *)__pyx_t_5);
      }
      __Pyx_XGOTREF((PyObject *)__pyx_v_6gevent_17_gevent_cgreenlet__start_completed_event);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet__start_completed_event, ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__dummy_event *)__pyx_t_5));
      __Pyx_GIVEREF((PyObject *)__pyx_t_5);
      __pyx_t_5 = 0;

     1040:

     1041:

     1042: # This is *only* called as a callback from the hub via Greenlet.kill(),

     1043: # and its first argument is the Greenlet. So we can be sure about the types.

    +1044: def _kill(glet, exception, waiter):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_1_kill(PyObject *__pyx_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_17_gevent_cgreenlet__kill(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_glet, PyObject *__pyx_v_exception, PyObject *__pyx_v_waiter, CYTHON_UNUSED int __pyx_skip_dispatch) {
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet._kill", __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_17_gevent_cgreenlet_1_kill(PyObject *__pyx_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_17_gevent_cgreenlet__kill, "_kill(Greenlet glet, exception, waiter)");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_1_kill = {"_kill", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_1_kill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet__kill};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_1_kill(PyObject *__pyx_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
    ) {
      struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_glet = 0;
      PyObject *__pyx_v_exception = 0;
      PyObject *__pyx_v_waiter = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_kill (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_glet,&__pyx_mstate_global->__pyx_n_u_exception,&__pyx_mstate_global->__pyx_n_u_waiter,0};
      PyObject* values[3] = {0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1044, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1044, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1044, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1044, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_kill", 0) < 0) __PYX_ERR(0, 1044, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 3; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_kill", 1, 3, 3, i); __PYX_ERR(0, 1044, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 3)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1044, __pyx_L3_error)
          values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1044, __pyx_L3_error)
          values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1044, __pyx_L3_error)
        }
        __pyx_v_glet = ((struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *)values[0]);
        __pyx_v_exception = values[1];
        __pyx_v_waiter = values[2];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_kill", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1044, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet._kill", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_glet), __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, 1, "glet", 0))) __PYX_ERR(0, 1044, __pyx_L1_error)
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet__kill(__pyx_self, __pyx_v_glet, __pyx_v_exception, __pyx_v_waiter);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet__kill(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_glet, PyObject *__pyx_v_exception, PyObject *__pyx_v_waiter) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet__kill(__pyx_v_glet, __pyx_v_exception, __pyx_v_waiter, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __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_cgreenlet._kill", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_1_kill, 0, __pyx_mstate_global->__pyx_n_u_kill_2, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1044, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kill_2, __pyx_t_5) < 0) __PYX_ERR(0, 1044, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +1045:     try:

      {
        /*try:*/ {
    /* … */
        }
        __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_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    /* … */
        __pyx_L5_except_error:;
        __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:;
      }

    +1046:         if isinstance(exception, tuple) and len(exception) == 3:

          __pyx_t_5 = PyTuple_Check(__pyx_v_exception);
          if (__pyx_t_5) {
          } else {
            __pyx_t_4 = __pyx_t_5;
            goto __pyx_L10_bool_binop_done;
          }
          __pyx_t_6 = PyObject_Length(__pyx_v_exception); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1046, __pyx_L3_error)
          __pyx_t_5 = (__pyx_t_6 == 3);
          __pyx_t_4 = __pyx_t_5;
          __pyx_L10_bool_binop_done:;
          if (__pyx_t_4) {
    /* … */
            goto __pyx_L9;
          }

    +1047:             glet.throw(*exception)

            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_glet), __pyx_mstate_global->__pyx_n_u_throw); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1047, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_v_exception); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1047, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_8);
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1047, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

     1048:         else:

    +1049:             glet.throw(exception)

          /*else*/ {
            __pyx_t_8 = ((PyObject *)__pyx_v_glet);
            __Pyx_INCREF(__pyx_t_8);
            __pyx_t_10 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_exception};
              __pyx_t_9 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_throw, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1049, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_9);
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          }
          __pyx_L9:;

    +1050:     except: # pylint:disable=bare-except, undefined-variable

        /*except:*/ {
          __Pyx_AddTraceback("gevent._gevent_cgreenlet._kill", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(0, 1050, __pyx_L5_except_error)
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_7);

     1051:         # XXX do we need this here?

    +1052:         get_my_hub(glet).handle_error(glet, *sys_exc_info())

          __pyx_t_11 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_glet))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1052, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_handle_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1052, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1052, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_INCREF((PyObject *)__pyx_v_glet);
          __Pyx_GIVEREF((PyObject *)__pyx_v_glet);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_glet)) != (0)) __PYX_ERR(0, 1052, __pyx_L5_except_error);
          __pyx_t_14 = NULL;
          __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);
          __pyx_t_15 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info;
          __pyx_t_10 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_15))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
            assert(__pyx_t_14);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_15, __pyx__function);
            __pyx_t_10 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
            __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1052, __pyx_L5_except_error)
            __Pyx_GOTREF(__pyx_t_13);
          }
          __pyx_t_15 = __Pyx_PySequence_Tuple(__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1052, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1052, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1052, __pyx_L5_except_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L4_exception_handled;
        }

    +1053:     if waiter is not None:

      __pyx_t_4 = (__pyx_v_waiter != Py_None);
      if (__pyx_t_4) {
    /* … */
      }

    +1054:         waiter.switch(None)

        __pyx_t_8 = __pyx_v_waiter;
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_10 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, Py_None};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_switch, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1054, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

     1055:

     1056:

    +1057: def joinall(greenlets, timeout=None, raise_error=False, count=None):

    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_3joinall(PyObject *__pyx_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_17_gevent_cgreenlet_joinall(PyObject *__pyx_v_greenlets, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_17_gevent_cgreenlet_joinall *__pyx_optional_args) {
      PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
      PyObject *__pyx_v_raise_error = ((PyObject *)Py_False);
      PyObject *__pyx_v_count = ((PyObject *)Py_None);
      PyObject *__pyx_v_done = 0;
      PyObject *__pyx_v_obj = NULL;
      PyObject *__pyx_r = NULL;
      if (__pyx_optional_args) {
        if (__pyx_optional_args->__pyx_n > 0) {
          __pyx_v_timeout = __pyx_optional_args->timeout;
          if (__pyx_optional_args->__pyx_n > 1) {
            __pyx_v_raise_error = __pyx_optional_args->raise_error;
            if (__pyx_optional_args->__pyx_n > 2) {
              __pyx_v_count = __pyx_optional_args->count;
            }
          }
        }
      }
    /* … */
      /* function exit code */
      __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_cgreenlet.joinall", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_done);
      __Pyx_XDECREF(__pyx_v_obj);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_3joinall(PyObject *__pyx_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_17_gevent_cgreenlet_2joinall, "joinall(greenlets, timeout=None, raise_error=False, count=None)\n\nWait for the ``greenlets`` to finish.\n\n:param greenlets: A sequence (supporting :func:`len`) of greenlets to wait for.\n:keyword float timeout: If given, the maximum number of seconds to wait.\n:return: A sequence of the greenlets that finished before the timeout (if any)\n    expired.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_3joinall = {"joinall", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_3joinall, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_2joinall};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_3joinall(PyObject *__pyx_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_greenlets = 0;
      PyObject *__pyx_v_timeout = 0;
      PyObject *__pyx_v_raise_error = 0;
      PyObject *__pyx_v_count = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("joinall (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_greenlets,&__pyx_mstate_global->__pyx_n_u_timeout,&__pyx_mstate_global->__pyx_n_u_raise_error,&__pyx_mstate_global->__pyx_n_u_count,0};
      PyObject* values[4] = {0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1057, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1057, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1057, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1057, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1057, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "joinall", 0) < 0) __PYX_ERR(0, 1057, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("joinall", 0, 1, 4, i); __PYX_ERR(0, 1057, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1057, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1057, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1057, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1057, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_False));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_greenlets = values[0];
        __pyx_v_timeout = values[1];
        __pyx_v_raise_error = values[2];
        __pyx_v_count = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("joinall", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1057, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.joinall", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_2joinall(__pyx_self, __pyx_v_greenlets, __pyx_v_timeout, __pyx_v_raise_error, __pyx_v_count);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_2joinall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_greenlets, PyObject *__pyx_v_timeout, PyObject *__pyx_v_raise_error, PyObject *__pyx_v_count) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2.__pyx_n = 3;
      __pyx_t_2.timeout = __pyx_v_timeout;
      __pyx_t_2.raise_error = __pyx_v_raise_error;
      __pyx_t_2.count = __pyx_v_count;
      __pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet_joinall(__pyx_v_greenlets, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1057, __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_cgreenlet.joinall", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_3joinall, 0, __pyx_mstate_global->__pyx_n_u_joinall, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1057, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[5]);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_joinall, __pyx_t_5) < 0) __PYX_ERR(0, 1057, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     1058:     """

     1059:     Wait for the ``greenlets`` to finish.

     1060:

     1061:     :param greenlets: A sequence (supporting :func:`len`) of greenlets to wait for.

     1062:     :keyword float timeout: If given, the maximum number of seconds to wait.

     1063:     :return: A sequence of the greenlets that finished before the timeout (if any)

     1064:         expired.

     1065:     """

    +1066:     if not raise_error:

      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_raise_error); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1066, __pyx_L1_error)
      __pyx_t_2 = (!__pyx_t_1);
      if (__pyx_t_2) {
    /* … */
      }

    +1067:         return wait(greenlets, timeout=timeout, count=count)

        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = NULL;
        __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_wait);
        __pyx_t_5 = __pyx_v_6gevent_17_gevent_cgreenlet_wait;
        __pyx_t_6 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_4);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_6 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_v_greenlets};
          __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1067, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_v_timeout, __pyx_t_7, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1067, __pyx_L1_error)
          if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_count, __pyx_v_count, __pyx_t_7, __pyx_callargs+2, 1) < 0) __PYX_ERR(0, 1067, __pyx_L1_error)
          __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __pyx_r = __pyx_t_3;
        __pyx_t_3 = 0;
        goto __pyx_L0;

     1068:

    +1069:     done = []

      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1069, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_done = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

    +1070:     for obj in iwait(greenlets, timeout=timeout, count=count):

      __pyx_t_5 = NULL;
      __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_iwait);
      __pyx_t_7 = __pyx_v_6gevent_17_gevent_cgreenlet_iwait;
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, __pyx_v_greenlets};
        __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_v_timeout, __pyx_t_4, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
        if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_count, __pyx_v_count, __pyx_t_4, __pyx_callargs+2, 1) < 0) __PYX_ERR(0, 1070, __pyx_L1_error)
        __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_7, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
        __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7);
        __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1070, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1070, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          if (likely(PyList_CheckExact(__pyx_t_7))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1070, __pyx_L1_error)
              #endif
              if (__pyx_t_8 >= __pyx_temp) break;
            }
            __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_7, __pyx_t_8);
            ++__pyx_t_8;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1070, __pyx_L1_error)
              #endif
              if (__pyx_t_8 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8));
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8);
            #endif
            ++__pyx_t_8;
          }
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error)
        } else {
          __pyx_t_3 = __pyx_t_9(__pyx_t_7);
          if (unlikely(!__pyx_t_3)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1070, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_3);
        __pyx_t_3 = 0;
    /* … */
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    +1071:         if getattr(obj, 'exception', None) is not None:

        __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_exception, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = (__pyx_t_3 != Py_None);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_2) {
    /* … */
        }

    +1072:             if hasattr(obj, '_raise_exception'):

          __pyx_t_2 = __Pyx_HasAttr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_raise_exception); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1072, __pyx_L1_error)
          if (likely(__pyx_t_2)) {
    /* … */
            goto __pyx_L7;
          }

    +1073:                 obj._raise_exception()

            __pyx_t_4 = __pyx_v_obj;
            __Pyx_INCREF(__pyx_t_4);
            __pyx_t_6 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
              __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_raise_exception, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1073, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     1074:             else:

    +1075:                 raise obj.exception

          /*else*/ {
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __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, 1075, __pyx_L1_error)
          }
          __pyx_L7:;

    +1076:         done.append(obj)

        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_done, __pyx_v_obj); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1076, __pyx_L1_error)

    +1077:     return done

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_done);
      __pyx_r = __pyx_v_done;
      goto __pyx_L0;

     1078:

     1079:

    +1080: def _killall3(greenlets, exception, waiter):

    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet__killall3(PyObject *__pyx_v_greenlets, PyObject *__pyx_v_exception, PyObject *__pyx_v_waiter) {
      PyObject *__pyx_v_diehards = 0;
      PyObject *__pyx_v_g = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_3);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_16);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet._killall3", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_diehards);
      __Pyx_XDECREF(__pyx_v_g);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1081:     diehards = []

      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_diehards = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +1082:     for g in greenlets:

      if (unlikely(__pyx_v_greenlets == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 1082, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_greenlets; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1082, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2);
        ++__pyx_t_2;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_3);
        __pyx_t_3 = 0;
    /* … */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1083:         if not g.dead:

        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_mstate_global->__pyx_n_u_dead); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1083, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = (!__pyx_t_4);
        if (__pyx_t_5) {
    /* … */
        }

    +1084:             try:

          {
            /*try:*/ {
    /* … */
            }
            __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;
            goto __pyx_L13_try_end;
            __pyx_L6_error:;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    /* … */
            __pyx_L8_except_error:;
            __Pyx_XGIVEREF(__pyx_t_6);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
            goto __pyx_L1_error;
            __pyx_L7_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_6);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
            __pyx_L13_try_end:;
          }

    +1085:                 g.throw(exception)

              __pyx_t_9 = __pyx_v_g;
              __Pyx_INCREF(__pyx_t_9);
              __pyx_t_10 = 0;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_exception};
                __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_throw, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1085, __pyx_L6_error)
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +1086:             except: # pylint:disable=bare-except, undefined-variable

            /*except:*/ {
              __Pyx_AddTraceback("gevent._gevent_cgreenlet._killall3", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_11) < 0) __PYX_ERR(0, 1086, __pyx_L8_except_error)
              __Pyx_XGOTREF(__pyx_t_3);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_11);

    +1087:                 get_my_hub(g).handle_error(g, *sys_exc_info())

              if (!(likely(((__pyx_v_g) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_g, __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet))))) __PYX_ERR(0, 1087, __pyx_L8_except_error)
              __pyx_t_12 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_g))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1087, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_handle_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1087, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1087, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_INCREF(__pyx_v_g);
              __Pyx_GIVEREF(__pyx_v_g);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_g) != (0)) __PYX_ERR(0, 1087, __pyx_L8_except_error);
              __pyx_t_15 = NULL;
              __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);
              __pyx_t_16 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info;
              __pyx_t_10 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_16))) {
                __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
                assert(__pyx_t_15);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
                __Pyx_INCREF(__pyx_t_15);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
                __pyx_t_10 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
                __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1087, __pyx_L8_except_error)
                __Pyx_GOTREF(__pyx_t_14);
              }
              __pyx_t_16 = __Pyx_PySequence_Tuple(__pyx_t_14); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1087, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_16);
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1087, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1087, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_16);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              goto __pyx_L7_exception_handled;
            }

    +1088:             if not g.dead:

          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_mstate_global->__pyx_n_u_dead); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1088, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_4 = (!__pyx_t_5);
          if (__pyx_t_4) {
    /* … */
          }

    +1089:                 diehards.append(g)

            __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_diehards, __pyx_v_g); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1089, __pyx_L1_error)

    +1090:     waiter.switch(diehards)

      __pyx_t_11 = __pyx_v_waiter;
      __Pyx_INCREF(__pyx_t_11);
      __pyx_t_10 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_diehards};
        __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_switch, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1091:

     1092:

    +1093: def _killall(greenlets, exception):

    static PyObject *__pyx_f_6gevent_17_gevent_cgreenlet__killall(PyObject *__pyx_v_greenlets, PyObject *__pyx_v_exception) {
      PyObject *__pyx_v_g = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_3);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_14);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_16);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet._killall", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = 0;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_g);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    +1094:     for g in greenlets:

      if (unlikely(__pyx_v_greenlets == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 1094, __pyx_L1_error)
      }
      __pyx_t_1 = __pyx_v_greenlets; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_2 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1094, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        __pyx_t_3 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2);
        ++__pyx_t_2;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_3);
        __pyx_t_3 = 0;
    /* … */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1095:         if not g.dead:

        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_mstate_global->__pyx_n_u_dead); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1095, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_5 = (!__pyx_t_4);
        if (__pyx_t_5) {
    /* … */
        }

    +1096:             try:

          {
            /*try:*/ {
    /* … */
            }
            __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;
            goto __pyx_L13_try_end;
            __pyx_L6_error:;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    /* … */
            __pyx_L8_except_error:;
            __Pyx_XGIVEREF(__pyx_t_6);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
            goto __pyx_L1_error;
            __pyx_L7_exception_handled:;
            __Pyx_XGIVEREF(__pyx_t_6);
            __Pyx_XGIVEREF(__pyx_t_7);
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
            __pyx_L13_try_end:;
          }

    +1097:                 g.throw(exception)

              __pyx_t_9 = __pyx_v_g;
              __Pyx_INCREF(__pyx_t_9);
              __pyx_t_10 = 0;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_exception};
                __pyx_t_3 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_throw, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L6_error)
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +1098:             except: # pylint:disable=bare-except, undefined-variable

            /*except:*/ {
              __Pyx_AddTraceback("gevent._gevent_cgreenlet._killall", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_11) < 0) __PYX_ERR(0, 1098, __pyx_L8_except_error)
              __Pyx_XGOTREF(__pyx_t_3);
              __Pyx_XGOTREF(__pyx_t_9);
              __Pyx_XGOTREF(__pyx_t_11);

    +1099:                 get_my_hub(g).handle_error(g, *sys_exc_info())

              if (!(likely(((__pyx_v_g) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_g, __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet))))) __PYX_ERR(0, 1099, __pyx_L8_except_error)
              __pyx_t_12 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet_get_my_hub(((PyGreenlet *)__pyx_v_g))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1099, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_12);
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_handle_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1099, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1099, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_12);
              __Pyx_INCREF(__pyx_v_g);
              __Pyx_GIVEREF(__pyx_v_g);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_g) != (0)) __PYX_ERR(0, 1099, __pyx_L8_except_error);
              __pyx_t_15 = NULL;
              __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);
              __pyx_t_16 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info;
              __pyx_t_10 = 1;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_16))) {
                __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
                assert(__pyx_t_15);
                PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16);
                __Pyx_INCREF(__pyx_t_15);
                __Pyx_INCREF(__pyx__function);
                __Pyx_DECREF_SET(__pyx_t_16, __pyx__function);
                __pyx_t_10 = 0;
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
                __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
                __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
                if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1099, __pyx_L8_except_error)
                __Pyx_GOTREF(__pyx_t_14);
              }
              __pyx_t_16 = __Pyx_PySequence_Tuple(__pyx_t_14); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1099, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_16);
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_16); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1099, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_14);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1099, __pyx_L8_except_error)
              __Pyx_GOTREF(__pyx_t_16);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              goto __pyx_L7_exception_handled;
            }

     1100:

     1101:

    +1102: def _call_spawn_callbacks(gr):

    static void __pyx_f_6gevent_17_gevent_cgreenlet__call_spawn_callbacks(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_gr) {
      PyObject *__pyx_v_cb = NULL;
    /* … */
      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet._call_spawn_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_cb);
      __Pyx_RefNannyFinishContext();
    }

    +1103:     if _spawn_callbacks is not None:

      __pyx_t_1 = (__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks != ((PyObject*)Py_None));
      if (__pyx_t_1) {
    /* … */
      }

    +1104:         for cb in _spawn_callbacks:

        __pyx_t_3 = 0;
        __pyx_t_6 = __Pyx_set_iterator(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks, 1, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_2);
        __pyx_t_2 = __pyx_t_6;
        __pyx_t_6 = 0;
        while (1) {
          __pyx_t_7 = __Pyx_set_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, &__pyx_t_6, __pyx_t_5);
          if (unlikely(__pyx_t_7 == 0)) break;
          if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_XDECREF_SET(__pyx_v_cb, __pyx_t_6);
          __pyx_t_6 = 0;

    +1105:             cb(gr)

          __pyx_t_8 = NULL;
          __Pyx_INCREF(__pyx_v_cb);
          __pyx_t_9 = __pyx_v_cb;
          __pyx_t_10 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_9))) {
            __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
            assert(__pyx_t_8);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
            __pyx_t_10 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_8, ((PyObject *)__pyx_v_gr)};
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1105, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     1106:

     1107:

    +1108: _spawn_callbacks = None

      __Pyx_INCREF(Py_None);
      __Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks);
      __Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks, ((PyObject*)Py_None));
      __Pyx_GIVEREF(Py_None);

     1109:

     1110:

    +1111: def killall(greenlets, exception=GreenletExit, block=True, timeout=None):

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_12__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
      PyObject *__pyx_r = NULL;
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
      __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 1111, __pyx_L1_error);
      __Pyx_INCREF(((PyObject*)Py_True));
      __Pyx_GIVEREF(((PyObject*)Py_True));
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)Py_True)) != (0)) __PYX_ERR(0, 1111, __pyx_L1_error);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(0, 1111, __pyx_L1_error);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1111, __pyx_L1_error);
      __Pyx_INCREF(Py_None);
      __Pyx_GIVEREF(Py_None);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 1111, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

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

    /* Python wrapper */
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_5killall(PyObject *__pyx_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_17_gevent_cgreenlet_4killall, "killall(greenlets, exception=GreenletExit, block=True, timeout=None)\n\nForceably terminate all the *greenlets* by causing them to raise *exception*.\n\n.. caution:: Use care when killing greenlets. If they are not prepared for exceptions,\n   this could result in corrupted state.\n\n:param greenlets: A **bounded** iterable of the non-None greenlets to terminate.\n   *All* the items in this iterable must be greenlets that belong to the same hub,\n   which should be the hub for this current thread. If this is a generator or iterator\n   that switches greenlets, the results are undefined.\n:keyword exception: The type of exception to raise in the greenlets. By default this is\n    :class:`GreenletExit`.\n:keyword bool block: If True (the default) then this function only returns when all the\n    greenlets are dead; the current greenlet is unscheduled during that process.\n    If greenlets ignore the initial exception raised in them,\n    then they will be joined (with :func:`gevent.joinall`) and allowed to die naturally.\n    If False, this function returns immediately and greenlets will raise\n    the exception asynchronously.\n:keyword float timeout: A time in seconds to wait for greenlets to die. If given, it is\n    only honored when ``block`` is True.\n:raise Timeout: If blocking and a timeout is given that elapses before\n    all the greenlets are dead.\n\n.. versionchanged:: 1.1a2\n    *greenlets* can be any iterable of greenlets, like an iterator or a set.\n    Previously it had to be a list or tuple.\n.. versionchanged:: 1.5a3\n    Any :class:`Greenlet` in the *greenlets* list that hadn't been switched to before\n    calling this method will never be switched to. This makes this function\n    behave like :meth:`Greenlet.kill`. This does not apply to raw greenlets.\n.. versionchanged:: 1.5a3\n    Now accepts raw greenlets created by :func:`gevent.spawn_raw`.");
    static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_5killall = {"killall", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6gevent_17_gevent_cgreenlet_5killall, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6gevent_17_gevent_cgreenlet_4killall};
    static PyObject *__pyx_pw_6gevent_17_gevent_cgreenlet_5killall(PyObject *__pyx_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_greenlets = 0;
      PyObject *__pyx_v_exception = 0;
      PyObject *__pyx_v_block = 0;
      PyObject *__pyx_v_timeout = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("killall (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_greenlets,&__pyx_mstate_global->__pyx_n_u_exception,&__pyx_mstate_global->__pyx_n_u_block,&__pyx_mstate_global->__pyx_n_u_timeout,0};
      PyObject* values[4] = {0,0,0,0};
        struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self);
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1111, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "killall", 0) < 0) __PYX_ERR(0, 1111, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("killall", 0, 1, 4, i); __PYX_ERR(0, 1111, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1111, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1111, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0);
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None));
        }
        __pyx_v_greenlets = values[0];
        __pyx_v_exception = values[1];
        __pyx_v_block = values[2];
        __pyx_v_timeout = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("killall", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1111, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.killall", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_4killall(__pyx_self, __pyx_v_greenlets, __pyx_v_exception, __pyx_v_block, __pyx_v_timeout);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_6gevent_17_gevent_cgreenlet_4killall(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_greenlets, PyObject *__pyx_v_exception, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
      PyObject *__pyx_v_need_killed = NULL;
      PyObject *__pyx_v_glet = NULL;
      PyObject *__pyx_v_cancel = NULL;
      PyObject *__pyx_v_loop = NULL;
      struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *__pyx_v_waiter = NULL;
      PyObject *__pyx_v_t = NULL;
      PyObject *__pyx_v_alive = NULL;
      PyObject *__pyx_r = NULL;
    /* … */
      /* 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_8);
      __Pyx_XDECREF(__pyx_t_9);
      __Pyx_AddTraceback("gevent._gevent_cgreenlet.killall", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_need_killed);
      __Pyx_XDECREF(__pyx_v_glet);
      __Pyx_XDECREF(__pyx_v_cancel);
      __Pyx_XDECREF(__pyx_v_loop);
      __Pyx_XDECREF((PyObject *)__pyx_v_waiter);
      __Pyx_XDECREF(__pyx_v_t);
      __Pyx_XDECREF(__pyx_v_alive);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_5killall, 0, __pyx_mstate_global->__pyx_n_u_killall, NULL, __pyx_mstate_global->__pyx_n_u_gevent__gevent_cgreenlet, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, __pyx_mstate_global->__pyx_ptype_6gevent_17_gevent_cgreenlet___pyx_defaults)) __PYX_ERR(0, 1111, __pyx_L1_error)
      __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);
      __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_5)->arg0 = __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit;
      __Pyx_GIVEREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);
      __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_6gevent_17_gevent_cgreenlet_12__defaults__);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_killall, __pyx_t_5) < 0) __PYX_ERR(0, 1111, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    /* … */
    struct __pyx_defaults {
      PyObject_HEAD
      PyObject *arg0;
    };

     1112:     """

     1113:     Forceably terminate all the *greenlets* by causing them to raise *exception*.

     1114:

     1115:     .. caution:: Use care when killing greenlets. If they are not prepared for exceptions,

     1116:        this could result in corrupted state.

     1117:

     1118:     :param greenlets: A **bounded** iterable of the non-None greenlets to terminate.

     1119:        *All* the items in this iterable must be greenlets that belong to the same hub,

     1120:        which should be the hub for this current thread. If this is a generator or iterator

     1121:        that switches greenlets, the results are undefined.

     1122:     :keyword exception: The type of exception to raise in the greenlets. By default this is

     1123:         :class:`GreenletExit`.

     1124:     :keyword bool block: If True (the default) then this function only returns when all the

     1125:         greenlets are dead; the current greenlet is unscheduled during that process.

     1126:         If greenlets ignore the initial exception raised in them,

     1127:         then they will be joined (with :func:`gevent.joinall`) and allowed to die naturally.

     1128:         If False, this function returns immediately and greenlets will raise

     1129:         the exception asynchronously.

     1130:     :keyword float timeout: A time in seconds to wait for greenlets to die. If given, it is

     1131:         only honored when ``block`` is True.

     1132:     :raise Timeout: If blocking and a timeout is given that elapses before

     1133:         all the greenlets are dead.

     1134:

     1135:     .. versionchanged:: 1.1a2

     1136:         *greenlets* can be any iterable of greenlets, like an iterator or a set.

     1137:         Previously it had to be a list or tuple.

     1138:     .. versionchanged:: 1.5a3

     1139:         Any :class:`Greenlet` in the *greenlets* list that hadn't been switched to before

     1140:         calling this method will never be switched to. This makes this function

     1141:         behave like :meth:`Greenlet.kill`. This does not apply to raw greenlets.

     1142:     .. versionchanged:: 1.5a3

     1143:         Now accepts raw greenlets created by :func:`gevent.spawn_raw`.

     1144:     """

     1145:

    +1146:     need_killed = []

      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_need_killed = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

    +1147:     for glet in greenlets:

      if (likely(PyList_CheckExact(__pyx_v_greenlets)) || PyTuple_CheckExact(__pyx_v_greenlets)) {
        __pyx_t_1 = __pyx_v_greenlets; __Pyx_INCREF(__pyx_t_1);
        __pyx_t_2 = 0;
        __pyx_t_3 = NULL;
      } else {
        __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_greenlets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
      }
      for (;;) {
        if (likely(!__pyx_t_3)) {
          if (likely(PyList_CheckExact(__pyx_t_1))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1147, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            __pyx_t_4 = __Pyx_PyList_GetItemRef(__pyx_t_1, __pyx_t_2);
            ++__pyx_t_2;
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
              #if !CYTHON_ASSUME_SAFE_SIZE
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1147, __pyx_L1_error)
              #endif
              if (__pyx_t_2 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2));
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2);
            #endif
            ++__pyx_t_2;
          }
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1147, __pyx_L1_error)
        } else {
          __pyx_t_4 = __pyx_t_3(__pyx_t_1);
          if (unlikely(!__pyx_t_4)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1147, __pyx_L1_error)
              PyErr_Clear();
            }
            break;
          }
        }
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_XDECREF_SET(__pyx_v_glet, __pyx_t_4);
        __pyx_t_4 = 0;
    /* … */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1148:         # Quick pass through to prevent any greenlet from

     1149:         # actually being switched to if it hasn't already.

     1150:         # (Previously we called ``list(greenlets)`` so we're still

     1151:         # linear.)

     1152:         #

     1153:         # We don't use glet.kill() here because we don't want to schedule

     1154:         # any callbacks in the loop; we're about to handle that more directly.

    +1155:         try:

        {
          /*try:*/ {
    /* … */
          }
    /* … */
          __pyx_L7_except_error:;
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_XGIVEREF(__pyx_t_6);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
          goto __pyx_L1_error;
          __pyx_L6_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_5);
          __Pyx_XGIVEREF(__pyx_t_6);
          __Pyx_XGIVEREF(__pyx_t_7);
          __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
          __pyx_L12_try_end:;
        }

    +1156:             cancel = glet._maybe_kill_before_start

            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_glet, __pyx_mstate_global->__pyx_n_u_maybe_kill_before_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L5_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_XDECREF_SET(__pyx_v_cancel, __pyx_t_4);
            __pyx_t_4 = 0;

    +1157:         except AttributeError:

          __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
          if (__pyx_t_14) {
            __Pyx_AddTraceback("gevent._gevent_cgreenlet.killall", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_8) < 0) __PYX_ERR(0, 1157, __pyx_L7_except_error)
            __Pyx_XGOTREF(__pyx_t_4);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_8);

    +1158:             need_killed.append(glet)

            __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_need_killed, __pyx_v_glet); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 1158, __pyx_L7_except_error)
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            goto __pyx_L6_exception_handled;
          }
          goto __pyx_L7_except_error;

     1159:         else:

    +1160:             if not cancel(exception):

          /*else:*/ {
            __pyx_t_8 = NULL;
            __Pyx_INCREF(__pyx_v_cancel);
            __pyx_t_9 = __pyx_v_cancel;
            __pyx_t_10 = 1;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
              assert(__pyx_t_8);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
              __pyx_t_10 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_exception};
              __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1160, __pyx_L7_except_error)
              __Pyx_GOTREF(__pyx_t_4);
            }
            __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1160, __pyx_L7_except_error)
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            __pyx_t_12 = (!__pyx_t_11);
            if (__pyx_t_12) {
    /* … */
            }
          }
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          goto __pyx_L12_try_end;
          __pyx_L5_error:;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    +1161:                 need_killed.append(glet)

              __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_need_killed, __pyx_v_glet); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 1161, __pyx_L7_except_error)

     1162:

    +1163:     if not need_killed:

      __pyx_t_12 = (__Pyx_PyList_GET_SIZE(__pyx_v_need_killed) != 0);
      if (unlikely(((!CYTHON_ASSUME_SAFE_MACROS) && __pyx_t_12 < 0))) __PYX_ERR(0, 1163, __pyx_L1_error)
      __pyx_t_11 = (!__pyx_t_12);
      if (__pyx_t_11) {
    /* … */
      }

    +1164:         return

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

     1165:

    +1166:     loop = glet.loop # pylint:disable=undefined-loop-variable

      if (unlikely(!__pyx_v_glet)) { __Pyx_RaiseUnboundLocalError("glet"); __PYX_ERR(0, 1166, __pyx_L1_error) }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_glet, __pyx_mstate_global->__pyx_n_u_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_loop = __pyx_t_1;
      __pyx_t_1 = 0;

    +1167:     if block:

      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1167, __pyx_L1_error)
      if (__pyx_t_11) {
    /* … */
        goto __pyx_L18;
      }

    +1168:         waiter = Waiter() # pylint:disable=undefined-variable

        __pyx_t_8 = NULL;
        __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter);
        __pyx_t_9 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter);
        __pyx_t_10 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error)
          __Pyx_GOTREF((PyObject *)__pyx_t_1);
        }
        __pyx_v_waiter = ((struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *)__pyx_t_1);
        __pyx_t_1 = 0;

    +1169:         loop.run_callback(_killall3, need_killed, exception, waiter)

        __pyx_t_9 = __pyx_v_loop;
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_8 = __Pyx_CFunc_53f338__6gevent_17_gevent_cgreenlet_object__lParenlist__etc_to_py_9greenlets_9exception_6waiter(__pyx_f_6gevent_17_gevent_cgreenlet__killall3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = 0;
        {
          PyObject *__pyx_callargs[5] = {__pyx_t_9, __pyx_t_8, __pyx_v_need_killed, __pyx_v_exception, ((PyObject *)__pyx_v_waiter)};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_run_callback, __pyx_callargs+__pyx_t_10, (5-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1169, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1170:         t = Timeout._start_new_or_dummy(timeout)

        __pyx_t_8 = __pyx_v_6gevent_17_gevent_cgreenlet_Timeout;
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_10 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_timeout};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_start_new_or_dummy, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_v_t = __pyx_t_1;
        __pyx_t_1 = 0;

    +1171:         try:

        /*try:*/ {

    +1172:             alive = waiter.get()

          __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, 1172, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_v_alive = __pyx_t_1;
          __pyx_t_1 = 0;

    +1173:             if alive:

          __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_alive); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1173, __pyx_L20_error)
          if (__pyx_t_11) {
    /* … */
          }
        }

    +1174:                 joinall(alive, raise_error=False)

            __pyx_t_8 = NULL;
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_joinall); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_10 = 1;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
              assert(__pyx_t_8);
              PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9);
              __Pyx_INCREF(__pyx_t_8);
              __Pyx_INCREF(__pyx__function);
              __Pyx_DECREF_SET(__pyx_t_9, __pyx__function);
              __pyx_t_10 = 0;
            }
            #endif
            {
              PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_8, __pyx_v_alive};
              __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L20_error)
              __Pyx_GOTREF(__pyx_t_4);
              if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_raise_error, Py_False, __pyx_t_4, __pyx_callargs+2, 0) < 0) __PYX_ERR(0, 1174, __pyx_L20_error)
              __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder(__pyx_t_9, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4);
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L20_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1175:         finally:

    +1176:             t.cancel()

        /*finally:*/ {
          /*normal exit:*/{
            __pyx_t_9 = __pyx_v_t;
            __Pyx_INCREF(__pyx_t_9);
            __pyx_t_10 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
              __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L21;
          }
          __pyx_L20_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 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_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
             __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
            if ( unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
            __Pyx_XGOTREF(__pyx_t_7);
            __Pyx_XGOTREF(__pyx_t_6);
            __Pyx_XGOTREF(__pyx_t_5);
            __Pyx_XGOTREF(__pyx_t_17);
            __Pyx_XGOTREF(__pyx_t_18);
            __Pyx_XGOTREF(__pyx_t_19);
            __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
            {
              __pyx_t_9 = __pyx_v_t;
              __Pyx_INCREF(__pyx_t_9);
              __pyx_t_10 = 0;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_10, (1-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L24_error)
                __Pyx_GOTREF(__pyx_t_1);
              }
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __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_7);
            __Pyx_XGIVEREF(__pyx_t_6);
            __Pyx_XGIVEREF(__pyx_t_5);
            __Pyx_ErrRestore(__pyx_t_7, __pyx_t_6, __pyx_t_5);
            __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
            __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
            goto __pyx_L1_error;
            __pyx_L24_error:;
            __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_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
            goto __pyx_L1_error;
          }
          __pyx_L21:;
        }

     1177:     else:

    +1178:         loop.run_callback(_killall, need_killed, exception)

      /*else*/ {
        __pyx_t_9 = __pyx_v_loop;
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_4 = __Pyx_CFunc_adc8fb__6gevent_17_gevent_cgreenlet_object__lParenlist__etc_to_py_9greenlets_9exception(__pyx_f_6gevent_17_gevent_cgreenlet__killall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1178, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = 0;
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_t_4, __pyx_v_need_killed, __pyx_v_exception};
          __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_run_callback, __pyx_callargs+__pyx_t_10, (4-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L18:;

     1179:

    +1180: def _init():

    static void __pyx_f_6gevent_17_gevent_cgreenlet__init(void) {

    +1181:     greenlet_init() # pylint:disable=undefined-variable

      __pyx_f_6gevent_17_gevent_cgreenlet_greenlet_init(); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1181, __pyx_L1_error)

     1182:

    +1183: _init()

      __pyx_f_6gevent_17_gevent_cgreenlet__init(); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L1_error)

     1184:

    +1185: from gevent._util import import_c_accel

      __pyx_t_5 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_n_u_import_c_accel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent__util, __pyx_t_5, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_import_c_accel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_import_c_accel, __pyx_t_5) < 0) __PYX_ERR(0, 1185, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +1186: import_c_accel(globals(), 'gevent._greenlet')

      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_import_c_accel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_Globals(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = 1;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_7, __pyx_mstate_global->__pyx_kp_u_gevent__greenlet};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;