Generated by Cython 3.0.0a11

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_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_getframe);__Pyx_GIVEREF(__pyx_n_s_getframe);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_getframe);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_exc_info);__Pyx_GIVEREF(__pyx_n_s_exc_info);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_exc_info);__pyx_t_2 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_ref);__Pyx_GIVEREF(__pyx_n_s_ref);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ref);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_greenlet);__Pyx_GIVEREF(__pyx_n_s_greenlet);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_greenlet);__pyx_t_2 = __Pyx_Import(__pyx_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_GreenletExit);__Pyx_GIVEREF(__pyx_n_s_GreenletExit);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_GreenletExit);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_reraise);__Pyx_GIVEREF(__pyx_n_s_reraise);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_reraise);__pyx_t_2 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_PYPY_2);__Pyx_GIVEREF(__pyx_n_s_PYPY_2);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PYPY_2);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_dump_traceback);__Pyx_GIVEREF(__pyx_n_s_dump_traceback);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_dump_traceback);__pyx_t_2 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_load_traceback);__Pyx_GIVEREF(__pyx_n_s_load_traceback);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_load_traceback);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_InvalidSwitchError);__Pyx_GIVEREF(__pyx_n_s_InvalidSwitchError);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_InvalidSwitchError);__pyx_t_2 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_iwait_on_objects);__Pyx_GIVEREF(__pyx_n_s_iwait_on_objects);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_iwait_on_objects);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_wait_on_objects);__Pyx_GIVEREF(__pyx_n_s_wait_on_objects);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_wait_on_objects);__pyx_t_2 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_Timeout);__Pyx_GIVEREF(__pyx_n_s_Timeout);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Timeout);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_config);__Pyx_GIVEREF(__pyx_n_s_config);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_config);__pyx_t_2 = __Pyx_Import(__pyx_n_s_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_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_readproperty);__Pyx_GIVEREF(__pyx_n_s_readproperty);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_readproperty);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_readproperty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem(__pyx_d, __pyx_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_get_hub_noargs);__Pyx_GIVEREF(__pyx_n_s_get_hub_noargs);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_get_hub_noargs);__pyx_t_2 = __Pyx_Import(__pyx_n_s_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_n_s_get_hub_noargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem(__pyx_d, __pyx_n_s_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 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_waiter_2);__Pyx_GIVEREF(__pyx_n_s_waiter_2);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_waiter_2);__pyx_t_3 = __Pyx_Import(__pyx_n_s_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_n_s_waiter_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem(__pyx_d, __pyx_n_s_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 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_n_s_Greenlet);__Pyx_GIVEREF(__pyx_n_s_Greenlet);PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Greenlet);__Pyx_INCREF(__pyx_n_s_joinall);__Pyx_GIVEREF(__pyx_n_s_joinall);PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_joinall);__Pyx_INCREF(__pyx_n_s_killall);__Pyx_GIVEREF(__pyx_n_s_killall);PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_killall);if (PyDict_SetItem(__pyx_d, __pyx_n_s_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_3 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getcurrent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__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_n_s_getcurrent, __pyx_t_2) < 0))) __PYX_ERR(0, 44, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_greenlet); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 44, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__24);__Pyx_GIVEREF(__pyx_tuple__24);

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

    /* 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda", 0);__Pyx_XDECREF(__pyx_r);__pyx_r = Py_None; __Pyx_INCREF(Py_None);goto __pyx_L0;/* function exit code */__pyx_L0:;__Pyx_XGIVEREF(__pyx_r);__Pyx_RefNannyFinishContext();return __pyx_r;}__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_6lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__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_n_s_greenlet_init, __pyx_t_2) < 0))) __PYX_ERR(0, 45, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_waiter_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Waiter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (unlikely((PyDict_SetItem(__pyx_t_2, __pyx_n_s_Waiter, __pyx_t_3) < 0))) __PYX_ERR(0, 46, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda1", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_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_n_s_lambda, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (unlikely((PyDict_SetItem(__pyx_t_2, __pyx_n_s_get_my_hub, __pyx_t_3) < 0))) __PYX_ERR(0, 53, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda2", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_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_n_s_lambda, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (unlikely((PyDict_SetItem(__pyx_t_2, __pyx_n_s_get_generic_parent, __pyx_t_3) < 0))) __PYX_ERR(0, 56, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda3", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_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_n_s_lambda, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (unlikely((PyDict_SetItem(__pyx_t_2, __pyx_n_s_Gevent_PyFrame_GetCode, __pyx_t_3) < 0))) __PYX_ERR(0, 59, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda4", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_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_n_s_lambda, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (unlikely((PyDict_SetItem(__pyx_t_2, __pyx_n_s_Gevent_PyFrame_GetLineNumber, __pyx_t_3) < 0))) __PYX_ERR(0, 60, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("lambda5", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_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_n_s_lambda, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (unlikely((PyDict_SetItem(__pyx_t_2, __pyx_n_s_Gevent_PyFrame_GetBack, __pyx_t_3) < 0))) __PYX_ERR(0, 61, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_n_s_continuation, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem(__pyx_d, __pyx_n_s_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_n_s_continuation); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_continulet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (PyDict_SetItem(__pyx_d, __pyx_n_s_continulet_2, __pyx_t_2) < 0) __PYX_ERR(0, 66, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_callback);__Pyx_GIVEREF(__pyx_n_s_callback);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_callback);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink->tp_dict, __pyx_n_s_slots, __pyx_t_2) < 0) __PYX_ERR(0, 75, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);

     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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);int __pyx_r;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};#endifPyObject* values[1] = {0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 77, __pyx_L3_error)else goto __pyx_L5_argtuple_error;}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 77, __pyx_L3_error)}} else if (unlikely(__pyx_nargs != 1)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);}__pyx_v_callback = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 77, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__init__", 0);/* function exit code */__pyx_r = 0;goto __pyx_L0;__pyx_L1_error:;__Pyx_XDECREF(__pyx_t_3);__Pyx_XDECREF(__pyx_t_4);__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_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_v_callback);__Pyx_GIVEREF(__pyx_v_callback);PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_callback);__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_r, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 79, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;__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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0};#endifPyObject* values[1] = {0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L3_error)else goto __pyx_L5_argtuple_error;}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 82, __pyx_L3_error)}} else if (unlikely(__pyx_nargs != 1)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);}__pyx_v_source = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 82, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__call__", 0);/* 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.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_1 = ((PyObject *)__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_noargs(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_v_self->callback);__Pyx_GIVEREF(__pyx_v_self->callback);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->callback);__Pyx_GIVEREF(__pyx_t_1);PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);__pyx_t_1 = 0;__pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_v_g = ((PyGreenlet *)__pyx_t_1);__pyx_t_1 = 0;

    +0084:         g.switch(source)

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_g), __pyx_n_s_switch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = NULL;__pyx_t_4 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_4 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_source};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __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;

     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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);Py_hash_t __pyx_r;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__hash__", 0);/* 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__eq__", 0);/* 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_n_s_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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__str__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__str__", 0);/* 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_Str(__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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__repr__", 0);/* 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__getattr__", 0);/* 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_ASSERTIONSif (unlikely(!Py_OptimizeFlag)) {__pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_item, __pyx_n_s_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)}}#elseif ((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_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink->tp_dict, __pyx_n_s_slots, __pyx_t_2) < 0) __PYX_ERR(0, 108, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);

     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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0};#endifPyObject* values[1] = {0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L3_error)else goto __pyx_L5_argtuple_error;}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 110, __pyx_L3_error)}} else if (unlikely(__pyx_nargs != 1)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);}__pyx_v_source = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 110, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__call__", 0);/* 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.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_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_successful); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = NULL;__pyx_t_4 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_4 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_3, };__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 111, __pyx_L1_error)__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;if (__pyx_t_5) {}

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

    __Pyx_XDECREF(__pyx_r);__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = NULL;__pyx_t_4 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_4 = 1;}}{PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_source};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __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;

     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_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink->tp_dict, __pyx_n_s_slots, __pyx_t_2) < 0) __PYX_ERR(0, 120, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);

     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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__call__ (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0};#endifPyObject* values[1] = {0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_source)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)else goto __pyx_L5_argtuple_error;}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__call__") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)}} else if (unlikely(__pyx_nargs != 1)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);}__pyx_v_source = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 122, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__call__", 0);/* 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.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_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_successful); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = NULL;__pyx_t_4 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_4 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_3, };__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 123, __pyx_L1_error)__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__pyx_t_6 = (!__pyx_t_5);if (__pyx_t_6) {}

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

    __Pyx_XDECREF(__pyx_r);__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink), __pyx_n_s_call); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = NULL;__pyx_t_4 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_4 = 1;}}{PyObject *__pyx_callargs[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_source};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __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;

     0125:

     0126: class _Frame(object):

     0127:

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

    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet__Frame->tp_dict, __pyx_n_s_slots, __pyx_tuple__25) < 0) __PYX_ERR(0, 128, __pyx_L1_error)PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet__Frame);__pyx_tuple__25 = PyTuple_Pack(3, __pyx_n_s_f_code, __pyx_n_s_f_lineno, __pyx_n_s_f_back); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 128, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__25);__Pyx_GIVEREF(__pyx_tuple__25);

     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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);int __pyx_r;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);if (unlikely(__pyx_nargs > 0)) {__Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__init__", 0);/* 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__", 0);/* 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_extract_stack", 0);/* 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_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_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_getframe);__pyx_t_5 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_getframe; __pyx_t_6 = NULL;__pyx_t_7 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);if (likely(__pyx_t_6)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);__Pyx_INCREF(__pyx_t_6);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_5, function);__pyx_t_7 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_6, };__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L3_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;}__pyx_v_frame = __pyx_t_4;__pyx_t_4 = 0;

    +0143:     except ValueError:

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

     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_5); __pyx_t_5 = 0;__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;goto __pyx_L4_exception_handled;}goto __pyx_L5_except_error;__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_9 = (__pyx_v_limit != 0);if (__pyx_t_9) {} else {__pyx_t_8 = __pyx_t_9;goto __pyx_L13_bool_binop_done;}__pyx_t_9 = (__pyx_v_frame != Py_None);__pyx_t_8 = __pyx_t_9;__pyx_L13_bool_binop_done:;if (!__pyx_t_8) break;

    +0157:         limit -= 1

    __pyx_v_limit = (__pyx_v_limit - 1);

    +0158:         older_Frame = _Frame()

    __pyx_t_6 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet__Frame)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 158, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_6);__Pyx_XDECREF_SET(__pyx_v_older_Frame, ((struct __pyx_obj_6gevent_17_gevent_cgreenlet__Frame *)__pyx_t_6));__pyx_t_6 = 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_6 = ((PyObject *)Gevent_PyFrame_GetCode(((__pyx_t_6gevent_17_gevent_cgreenlet_FrameType)__pyx_v_frame))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 162, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_6);__Pyx_GIVEREF(__pyx_t_6);__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_6);__pyx_t_6 = 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_8 = (((PyObject *)__pyx_v_newer_Frame) != Py_None);if (__pyx_t_8) {}

    +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_8 = (((PyObject *)__pyx_v_newest_Frame) == Py_None);if (__pyx_t_8) {}

    +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_6 = Gevent_PyFrame_GetBack(((__pyx_t_6gevent_17_gevent_cgreenlet_FrameType)__pyx_v_frame)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 170, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_6);__Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_6);__pyx_t_6 = 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_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 175, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_XGOTREF(__pyx_v_6gevent_17_gevent_cgreenlet__greenlet__init__);__Pyx_DECREF_SET(__pyx_v_6gevent_17_gevent_cgreenlet__greenlet__init__, __pyx_t_2);__Pyx_GIVEREF(__pyx_t_2);__pyx_t_2 = 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 (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_spawning_stack_limit, __pyx_int_10) < 0) __PYX_ERR(0, 183, __pyx_L1_error)PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);

     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_DOCstruct wrapperbase __pyx_wrapperbase_6gevent_17_gevent_cgreenlet_8Greenlet___init__;#endifstatic 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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);int __pyx_r;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);__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);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_run,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_run,0};#endifPyObject* values[1] = {0};values[0] = ((PyObject *)Py_None);if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {default:case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;}kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);switch (__pyx_nargs) {case  0:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_run);if (value) { values[0] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {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 (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 186, __pyx_L3_error)}} else {switch (__pyx_nargs) {default:case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;}}__pyx_v_run = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__init__", 0);/* 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 = ((PyObject *)__pyx_f_6gevent_19_gevent_c_hub_local_get_hub_noargs(0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet__greenlet__init__);__pyx_t_3 = __pyx_v_6gevent_17_gevent_cgreenlet__greenlet__init__; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[4] = {__pyx_t_4, ((PyObject *)__pyx_v_self), Py_None, __pyx_t_2};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__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_n_s_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_n_s_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_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); 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)__pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_The_run_argument_or_self__run_mu); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 262, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple_);__Pyx_GIVEREF(__pyx_tuple_);

     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_n_s_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_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_wref);__pyx_t_3 = __pyx_v_6gevent_17_gevent_cgreenlet_wref; __pyx_t_2 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_2)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_2);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_spawner)};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__Pyx_GIVEREF(__pyx_t_1);__Pyx_GOTREF(__pyx_v_self->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_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_n_s_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_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);if (__pyx_t_5) {__Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 293, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_GOTREF(__pyx_t_3);__Pyx_GOTREF(__pyx_t_2);

    +0294:                 self.spawn_tree_locals = {}

    __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_GIVEREF(__pyx_t_4);__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_4);__pyx_t_4 = 0;

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

    __pyx_t_4 = __pyx_f_6gevent_17_gevent_cgreenlet_get_generic_parent(__pyx_v_spawner); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_4);__pyx_t_7 = (__pyx_t_4 != Py_None);__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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_2); __pyx_t_2 = 0;goto __pyx_L7_exception_handled;}goto __pyx_L8_except_error;__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_4 = __pyx_v_self->spawn_tree_locals;__Pyx_INCREF(__pyx_t_4);if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_spawner), __pyx_n_s_spawn_tree_locals, __pyx_t_4) < 0) __PYX_ERR(0, 298, __pyx_L8_except_error)__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     0299:

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

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_spawning_stack_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 300, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_t_2 = ((PyObject *)__pyx_f_6gevent_17_gevent_cgreenlet__extract_stack(__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_GIVEREF(__pyx_t_2);__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_2);__pyx_t_2 = 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_get_minimal_ident", 0);/* 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_n_s_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_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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__", 0);/* 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\n        The greenlet name. By default, a unique name is constructed using\n        the :attr:`minimal_ident`. You can assign a string to this\n        value to change it. It is shown in the `repr` of this object if it\n        has 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.\n        ");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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("name (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("name", 0);/* 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_tuple__26 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 356, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__26);__Pyx_GIVEREF(__pyx_tuple__26);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_3name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_name, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_readproperty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 356, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_n_s_name_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 356, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__pyx_t_6 = NULL;__pyx_t_7 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_6)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_6);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_7 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_name_2, __pyx_t_2) < 0) __PYX_ERR(0, 356, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_name_2, 356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 356, __pyx_L1_error)

     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_n_s_minimal_ident); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_GIVEREF(__pyx_t_1);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);__pyx_t_1 = 0;__pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Greenlet_d, __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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_raise_exception (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_raise_exception", 0);/* 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_5_raise_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet__raise_exception, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_raise_exception, __pyx_t_2) < 0) __PYX_ERR(0, 372, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_raise_exception, 372, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 372, __pyx_L1_error)

    +0373:         reraise(*self.exc_info)

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__", 0);/* 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 __nonzero__(self):

    /* Python wrapper */static int __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_7__nonzero__(PyObject *__pyx_v_self); /*proto*/static int __pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_7__nonzero__(PyObject *__pyx_v_self) {CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);int __pyx_r;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);__pyx_r = __pyx_pf_6gevent_17_gevent_cgreenlet_8Greenlet_6__nonzero__(((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__nonzero__(struct __pyx_obj_6gevent_17_gevent_cgreenlet_Greenlet *__pyx_v_self) {int __pyx_r;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__nonzero__", 0);/* function exit code */__pyx_L0:;__Pyx_RefNannyFinishContext();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:     try:

    {/*try:*/ {}__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;goto __pyx_L8_try_end;__pyx_L3_error:;__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;__Pyx_XGIVEREF(__pyx_t_1);__Pyx_XGIVEREF(__pyx_t_8);__Pyx_XGIVEREF(__pyx_t_9);__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_8, __pyx_t_9);goto __pyx_L1_error;__pyx_L4_exception_handled:;__Pyx_XGIVEREF(__pyx_t_1);__Pyx_XGIVEREF(__pyx_t_8);__Pyx_XGIVEREF(__pyx_t_9);__Pyx_ExceptionReset(__pyx_t_1, __pyx_t_8, __pyx_t_9);__pyx_L8_try_end:;}

    +0384:         __bool__ = __nonzero__ # Python 3

    __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_n_s_nonzero); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L3_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_bool, __pyx_t_2) < 0) __PYX_ERR(0, 384, __pyx_L3_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);

    +0385:     except NameError: # pragma: no cover

    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_NameError);if (__pyx_t_7) {__Pyx_ErrRestore(0,0,0);goto __pyx_L4_exception_handled;}goto __pyx_L5_except_error;__pyx_L5_except_error:;

     0386:         # When we're compiled with Cython, the __nonzero__ function

     0387:         # goes directly into the slot and can't be accessed by name.

     0388:         pass

     0389:

     0390:     ### Lifecycle

     0391:

    +0392:     if _PYPY:

    if (__pyx_v_6gevent_17_gevent_cgreenlet__PYPY) {goto __pyx_L9;}

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

     0394:         @property

     0395:         def dead(self):

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

     0397:             # pylint:disable=no-member

     0398:             if self._greenlet__main:

     0399:                 return False

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

     0401:                 return True

     0402:

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

     0404:     else:

    +0405:         @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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__", 0);/* 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_L9:;

     0406:         def dead(self):

     0407:             """

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

     0409:

     0410:             This is true if:

     0411:

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

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

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

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

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

     0417:             """

    +0418:             return (

    __Pyx_XDECREF(__pyx_r);

    +0419:                 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 (!__pyx_t_2) {} else {__pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_1 = __pyx_t_3;__pyx_t_3 = 0;goto __pyx_L3_bool_binop_done;}

    +0420:                 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 (!__pyx_t_2) {} else {__pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_1 = __pyx_t_3;__pyx_t_3 = 0;goto __pyx_L3_bool_binop_done;}

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

    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet), __pyx_n_s_dead); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 421, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;__pyx_t_4 = NULL;__pyx_t_6 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_5, function);__pyx_t_6 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_self)};__pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;}__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;

     0422:             )

     0423:

    +0424:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__never_started_or_killed", 0);/* function exit code */__pyx_L0:;__Pyx_RefNannyFinishContext();return __pyx_r;}

    +0425:         return self._start_event is None

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

     0426:

    +0427:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__start_pending", 0);/* function exit code */__pyx_L1_error:;__Pyx_XDECREF(__pyx_t_3);__Pyx_XDECREF(__pyx_t_4);__Pyx_WriteUnraisable("gevent._gevent_cgreenlet.Greenlet._Greenlet__start_pending", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);__pyx_r = 0;__pyx_L0:;__Pyx_RefNannyFinishContext();return __pyx_r;}

     0428:         return (

    +0429:             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;}

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

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_start_event, __pyx_n_s_pending); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __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, 430, __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_n_s_active, Py_False); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __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, 430, __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;

     0431:         )

     0432:

    +0433:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__start_cancelled_by_kill", 0);/* function exit code */__pyx_L0:;__Pyx_RefNannyFinishContext();return __pyx_r;}

    +0434:         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;

     0435:

    +0436:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__start_completed", 0);/* function exit code */__pyx_L0:;__Pyx_RefNannyFinishContext();return __pyx_r;}

    +0437:         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;

     0438:

    +0439:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__started_but_aborted", 0);/* function exit code */__pyx_L0:;__Pyx_RefNannyFinishContext();return __pyx_r;}

     0440:         return (

    +0441:             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 (__pyx_t_2) {} else {__pyx_t_1 = __pyx_t_2;goto __pyx_L3_bool_binop_done;}

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

    __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 (__pyx_t_2) {} else {__pyx_t_1 = __pyx_t_2;goto __pyx_L3_bool_binop_done;}

    +0443:             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 (__pyx_t_2) {} else {__pyx_t_1 = __pyx_t_2;goto __pyx_L3_bool_binop_done;}

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

    __pyx_t_2 = (!((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_Greenlet__start_pending(__pyx_v_self));__pyx_t_1 = __pyx_t_2;__pyx_L3_bool_binop_done:;__pyx_r = __pyx_t_1;goto __pyx_L0;

     0445:         )

     0446:

    +0447:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__cancel_start", 0);/* 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._Greenlet__cancel_start", __pyx_clineno, __pyx_lineno, __pyx_filename);__pyx_r = 0;__pyx_L0:;__Pyx_XGIVEREF(__pyx_r);__Pyx_RefNannyFinishContext();return __pyx_r;}

    +0448:         if self._start_event is None:

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

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

    +0450:             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);

     0451:         # cancel any pending start event

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

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

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

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

     0456:         # except for the leak-tests.

    +0457:         self._start_event.stop()

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_start_event, __pyx_n_s_stop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 457, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __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;

    +0458:         self._start_event.close()

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_start_event, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __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;

     0459:

    +0460:     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_v_traceback = NULL;PyObject *__pyx_r = NULL;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__handle_death_before_start", 0);__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_traceback);__Pyx_XDECREF(__pyx_v_args);__Pyx_XGIVEREF(__pyx_r);__Pyx_RefNannyFinishContext();return __pyx_r;}

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

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

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

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

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

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

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

     0468:         # kill the greenlet).

    +0469:         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_n_s_dead); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __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, 469, __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) {}

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

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

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

     0473:             # here.

     0474:             #

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

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

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

     0478:             # the greenlet).

    +0479:             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, 479, __pyx_L1_error)}__pyx_t_4 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 479, __pyx_L1_error)__pyx_t_1 = (__pyx_t_4 == 1);if (__pyx_t_1) {goto __pyx_L6;}

    +0480:                 arg = args[0]

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

    +0481:                 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, __pyx_builtin_BaseException); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 481, __pyx_L1_error)__pyx_t_1 = __pyx_t_2;__pyx_L8_bool_binop_done:;if (__pyx_t_1) {goto __pyx_L7;}

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

    __Pyx_INCREF(__pyx_v_arg);__pyx_t_5 = __pyx_v_arg; __pyx_t_6 = NULL;__pyx_t_7 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);if (likely(__pyx_t_6)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);__Pyx_INCREF(__pyx_t_6);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_5, function);__pyx_t_7 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_6, };__pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;}__pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_INCREF(__pyx_v_arg);__Pyx_GIVEREF(__pyx_v_arg);PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_arg);__Pyx_GIVEREF(__pyx_t_3);PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);__Pyx_INCREF(Py_None);__Pyx_GIVEREF(Py_None);PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None);__pyx_t_3 = 0;__Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_5));__pyx_t_5 = 0;

     0483:                 else:

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

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

    +0485:             elif not args:

    __pyx_t_1 = (__pyx_v_args != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_args) != 0);__pyx_t_2 = (!__pyx_t_1);if (__pyx_t_2) {}__pyx_L6:;

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

    __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);__pyx_t_3 = __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit; __pyx_t_6 = NULL;__pyx_t_7 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_6)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_6);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_7 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_6, };__pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);__Pyx_GIVEREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);__Pyx_GIVEREF(__pyx_t_5);PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);__Pyx_INCREF(Py_None);__Pyx_GIVEREF(Py_None);PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);__pyx_t_5 = 0;__Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_3));__pyx_t_3 = 0;

    +0487:             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, 487, __pyx_L1_error)}__pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = PyObject_IsSubclass(__pyx_t_3, __pyx_builtin_BaseException); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 487, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__pyx_t_1 = (!__pyx_t_2);if (__pyx_t_1) {}

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

    +0489:                 print("RANDOM CRAP", args)

    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_kp_s_RANDOM_CRAP);__Pyx_GIVEREF(__pyx_kp_s_RANDOM_CRAP);PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_s_RANDOM_CRAP);__Pyx_INCREF(__pyx_v_args);__Pyx_GIVEREF(__pyx_v_args);PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args);__pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +0490:                 import traceback; traceback.print_stack()

    __pyx_t_5 = __Pyx_ImportDottedModule(__pyx_n_s_traceback, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 490, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__pyx_v_traceback = __pyx_t_5;__pyx_t_5 = 0;__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_traceback, __pyx_n_s_print_stack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 490, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_6 = NULL;__pyx_t_7 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_6)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_6);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_7 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_6, };__pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 490, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

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

    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_BaseException, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_builtin_BaseException);__Pyx_GIVEREF(__pyx_builtin_BaseException);PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_BaseException);__Pyx_GIVEREF(__pyx_t_5);PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);__Pyx_INCREF(Py_None);__Pyx_GIVEREF(Py_None);PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);__pyx_t_5 = 0;__Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_3));__pyx_t_3 = 0;

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

    #ifndef CYTHON_WITHOUT_ASSERTIONSif (unlikely(!Py_OptimizeFlag)) {if (unlikely(__pyx_v_args == Py_None)) {PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");__PYX_ERR(0, 492, __pyx_L1_error)}__pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_1 = PyObject_IsSubclass(__pyx_t_3, __pyx_builtin_BaseException); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 492, __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, 492, __pyx_L1_error)}}#elseif ((1)); else __PYX_ERR(0, 492, __pyx_L1_error)#endif

    +0493:             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, 493, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     0494:

    +0495:     @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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__", 0);/* 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;}

     0496:     def started(self):

     0497:         # DEPRECATED

    +0498:         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, 498, __pyx_L1_error)__pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_r = __pyx_t_2;__pyx_t_2 = 0;goto __pyx_L0;

     0499:

    +0500:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("ready", 0);/* Check if called by wrapper */if (unlikely(__pyx_skip_dispatch)) ;/* Check if overridden in Python */else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_ready); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_9ready)) {__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 500, __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_WriteUnraisable("gevent._gevent_cgreenlet.Greenlet.ready", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);__pyx_r = 0;__pyx_L0:;__Pyx_RefNannyFinishContext();return __pyx_r;}/* Python wrapper */static PyObject *__pyx_pw_6gevent_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\n        Return a true value if and only if the greenlet has finished\n        execution.\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``.\n        ");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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("ready (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("ready", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_ready(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __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.ready", __pyx_clineno, __pyx_lineno, __pyx_filename);__pyx_r = NULL;__pyx_L0:;__Pyx_XGIVEREF(__pyx_r);__Pyx_RefNannyFinishContext();return __pyx_r;}__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_9ready, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_ready, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_ready, __pyx_t_2) < 0) __PYX_ERR(0, 500, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_ready, 500, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 500, __pyx_L1_error)

     0501:         """

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

     0503:         execution.

     0504:

     0505:         .. versionchanged:: 1.1

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

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

     0508:         """

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

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __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, 509, __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;

     0510:

    +0511:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("successful", 0);/* Check if called by wrapper */if (unlikely(__pyx_skip_dispatch)) ;/* Check if overridden in Python */else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_successful); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_11successful)) {__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 511, __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_WriteUnraisable("gevent._gevent_cgreenlet.Greenlet.successful", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);__pyx_r = 0;__pyx_L0:;__Pyx_RefNannyFinishContext();return __pyx_r;}/* Python wrapper */static PyObject *__pyx_pw_6gevent_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\n        Return a true value if and only if the greenlet has finished execution\n        successfully, 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``.\n        ");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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("successful (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("successful", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_successful(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __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.successful", __pyx_clineno, __pyx_lineno, __pyx_filename);__pyx_r = NULL;__pyx_L0:;__Pyx_XGIVEREF(__pyx_r);__Pyx_RefNannyFinishContext();return __pyx_r;}__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_11successful, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_successful, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_successful, __pyx_t_2) < 0) __PYX_ERR(0, 511, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_successful, 511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 511, __pyx_L1_error)

     0512:         """

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

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

     0515:

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

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

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

     0519:

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

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

     0522:         """

    +0523:         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, 523, __pyx_L1_error)}__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __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;

     0524:

    +0525:     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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__repr__", 0);/* function exit code */__pyx_L1_error:;__Pyx_XDECREF(__pyx_t_1);__Pyx_XDECREF(__pyx_t_2);__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;}

    +0526:         classname = self.__class__.__name__

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __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;

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

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

     0529:         # overhead.

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

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_name_2, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 530, __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;}

    +0531:             name = ' '

    __Pyx_INCREF(__pyx_kp_s__3);__pyx_v_name = __pyx_kp_s__3;

     0532:         else:

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

    /*else*/ {__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_GIVEREF(__pyx_t_2);PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);__pyx_t_2 = 0;__pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__pyx_v_name = __pyx_t_2;__pyx_t_2 = 0;}__pyx_L3:;

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

    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_hex, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_v_classname);__Pyx_GIVEREF(__pyx_v_classname);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_classname);__Pyx_INCREF(__pyx_v_name);__Pyx_GIVEREF(__pyx_v_name);PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_name);__Pyx_GIVEREF(__pyx_t_1);PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1);__pyx_t_1 = 0;__pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_sat_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_v_result = ((PyObject*)__pyx_t_1);__pyx_t_1 = 0;

    +0535:         formatted = self._formatinfo()

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

    +0536:         if formatted:

    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_formatted); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 536, __pyx_L1_error)if (__pyx_t_3) {}

    +0537:             result += ': ' + formatted

    __pyx_t_1 = __Pyx_PyStr_ConcatSafe(__pyx_kp_s__4, __pyx_v_formatted); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));__pyx_t_2 = 0;

    +0538:         return result + '>'

    __Pyx_XDECREF(__pyx_r);__pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_r = __pyx_t_2;__pyx_t_2 = 0;goto __pyx_L0;

     0539:

     0540:

    +0541:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_formatinfo", 0);/* Check if called by wrapper */if (unlikely(__pyx_skip_dispatch)) ;/* Check if overridden in Python */else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_formatinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo)) {__Pyx_XDECREF(__pyx_r);__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_2))) __PYX_ERR(0, 541, __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_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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_formatinfo (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("_formatinfo", 0);__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, 541, __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_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_15_formatinfo, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet__formatinfo, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_formatinfo, __pyx_t_2) < 0) __PYX_ERR(0, 541, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_formatinfo, 541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 541, __pyx_L1_error)

    +0542:         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;

    +0543:         if info is not None:

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

    +0544:             return info

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

     0545:

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

     0547:         # or did a subclass override _run?

    +0548:         func = self._run

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_v_func = __pyx_t_1;__pyx_t_1 = 0;

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

    __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_func, __pyx_n_s_self, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_v_im_self = __pyx_t_1;__pyx_t_1 = 0;

    +0550:         if im_self is self:

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

    +0551:             funcname = '_run'

    __Pyx_INCREF(__pyx_n_s_run_2);__pyx_v_funcname = __pyx_n_s_run_2;

    +0552:         elif im_self is not None:

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

    +0553:             funcname = repr(func)

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

     0554:         else:

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

    /*else*/ {__pyx_t_2 = __Pyx_GetAttr3(__pyx_v_func, __pyx_n_s_name, __pyx_kp_s__6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __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, 555, __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, 555, __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:;

     0556:

    +0557:         result = funcname

    __Pyx_INCREF(__pyx_v_funcname);__pyx_v_result = __pyx_v_funcname;

    +0558:         args = []

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

    +0559:         if self.args:

    __pyx_t_6 = (__pyx_v_self->args != Py_None)&&(PyTuple_GET_SIZE(__pyx_v_self->args) != 0);if (__pyx_t_6) {}

    +0560:             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, 560, __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, 560, __pyx_L10_error)}__pyx_t_2 = __pyx_v_self->args; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;for (;;) {if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS__pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 560, __pyx_L10_error)#else__pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L10_error)__Pyx_GOTREF(__pyx_t_3);#endif__Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_3);__pyx_t_3 = 0;__pyx_t_3 = PyObject_Repr(__pyx_7genexpr__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L10_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__7, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L10_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 560, __pyx_L10_error)__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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_L13_exit_scope;__pyx_L10_error:;__Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;goto __pyx_L1_error;__pyx_L13_exit_scope:;} /* exit inner scope */__Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_1));__pyx_t_1 = 0;__pyx_slice__7 = PySlice_New(Py_None, __pyx_int_50, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(0, 560, __pyx_L1_error)__Pyx_GOTREF(__pyx_slice__7);__Pyx_GIVEREF(__pyx_slice__7);

    +0561:         if self.kwargs:

    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->kwargs); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 561, __pyx_L1_error)if (__pyx_t_6) {}

    +0562:             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, 562, __pyx_L17_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, 562, __pyx_L17_error)}__pyx_t_4 = __Pyx_dict_iterator(__pyx_v_self->kwargs, 1, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L17_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_XDECREF(__pyx_t_2);__pyx_t_2 = __pyx_t_4;__pyx_t_4 = 0;while (1) {__pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_8, &__pyx_t_7, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_5);if (unlikely(__pyx_t_9 == 0)) break;if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 562, __pyx_L17_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_GOTREF(__pyx_t_3);__Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_key, __pyx_t_4);__pyx_t_4 = 0;__Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_value, __pyx_t_3);__pyx_t_3 = 0;__pyx_t_3 = PyObject_Repr(__pyx_8genexpr1__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L17_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__7, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L17_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L17_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_8genexpr1__pyx_v_key);__Pyx_GIVEREF(__pyx_8genexpr1__pyx_v_key);PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_8genexpr1__pyx_v_key);__Pyx_GIVEREF(__pyx_t_4);PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);__pyx_t_4 = 0;__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L17_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 562, __pyx_L17_error)__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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_L20_exit_scope;__pyx_L17_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_L20_exit_scope:;} /* exit inner scope */__pyx_t_10 = __Pyx_PyList_Extend(__pyx_v_args, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 562, __pyx_L1_error)__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0563:         if args:

    __pyx_t_6 = (PyList_GET_SIZE(__pyx_v_args) != 0);if (__pyx_t_6) {}

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

    __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__9, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_2 = PyNumber_Add(__pyx_kp_s__8, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_s__10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __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, 564, __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;

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

    +0566:         self._formatted_info = result

    if (!(likely(PyString_CheckExact(__pyx_v_result))||((__pyx_v_result) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_result))) __PYX_ERR(0, 566, __pyx_L1_error)__pyx_t_2 = __pyx_v_result;__Pyx_INCREF(__pyx_t_2);__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;

    +0567:         return result

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

     0568:

    +0569:     @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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__", 0);/* 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;}

     0570:     def exception(self):

     0571:         """

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

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

     0574:         """

    +0575:         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, 575, __pyx_L1_error)}__pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_self->_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __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;

     0576:

    +0577:     @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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__get__", 0);/* 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;}

     0578:     def exc_info(self):

     0579:         """

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

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

     0582:

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

     0584:

     0585:         .. versionadded:: 1.1

     0586:         """

    +0587:         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;

    +0588:         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, 588, __pyx_L1_error)}__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_ei, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __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) {}

    +0589:             return (

    __Pyx_XDECREF(__pyx_r);

    +0590:                 ei[0],

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

    +0591:                 ei[1],

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

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

    +0593:                 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, 593, __pyx_L1_error)}__pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_ei, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 593, __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, 593, __pyx_L1_error)__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;if (__pyx_t_2) {if (unlikely(__pyx_v_ei == Py_None)) {PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");__PYX_ERR(0, 593, __pyx_L1_error)}__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_ei, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 593, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_7);__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_load_traceback);__pyx_t_8 = __pyx_v_6gevent_17_gevent_cgreenlet_load_traceback; __pyx_t_9 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_9)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_9);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};__pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 593, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_6);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}__pyx_t_5 = __pyx_t_6;__pyx_t_6 = 0;} else {__Pyx_INCREF(Py_None);__pyx_t_5 = Py_None;}

     0594:             )

     0595:

    +0596:     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)\nImmediately switch into the greenlet and raise an exception in it.\n\n        Should only be called from the HUB, otherwise the current greenlet is left unscheduled forever.\n        To raise an exception in a safe manner from any greenlet, use :meth:`kill`.\n\n        If a greenlet was started but never switched to yet, then also\n        a) cancel the event that will start it\n        b) fire the notifications as if an exception was raised in a greenlet\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_17throw = {"throw", (PyCFunction)(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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("throw (wrapper)", 0);if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "throw", 0))) 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("throw", 0);/* 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_tuple__32 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_args); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 596, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__32);__Pyx_GIVEREF(__pyx_tuple__32);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_17throw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_throw, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 596, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_throw, __pyx_t_2) < 0) __PYX_ERR(0, 596, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_throw, 596, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 596, __pyx_L1_error)

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

     0598:

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

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

     0601:

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

     0603:         a) cancel the event that will start it

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

     0605:         """

    +0606:         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, 606, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0607:

    +0608:         try:

    /*try:*/ {

    +0609:             if not self.dead:

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __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, 609, __pyx_L4_error)__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__pyx_t_3 = (!__pyx_t_2);if (__pyx_t_3) {}}

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

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

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

     0613:                 # LoopExit.

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

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet), __pyx_n_s_throw); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L4_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L4_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_INCREF((PyObject *)__pyx_v_self);__Pyx_GIVEREF((PyObject *)__pyx_v_self);PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));__pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __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, 614, __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;

     0615:         finally:

    +0616:             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, 616, __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;if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);if ((PY_MAJOR_VERSION < 3) || 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, 616, __pyx_L8_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;}if (PY_MAJOR_VERSION >= 3) {__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:;if (PY_MAJOR_VERSION >= 3) {__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:;}

     0617:

    +0618:     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)\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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("start (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("start", 0);/* 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_XDECREF(__pyx_t_5);__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_tuple__34 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_hub); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 618, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__34);__Pyx_GIVEREF(__pyx_tuple__34);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_19start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_start, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_start, __pyx_t_2) < 0) __PYX_ERR(0, 618, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_start, 618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 618, __pyx_L1_error)

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

    +0620:         if self._start_event is None:

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

    +0621:             _call_spawn_callbacks(self)

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

    +0622:             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, 622, __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;

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

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_hub->loop, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_switch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 623, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__pyx_t_5 = NULL;__pyx_t_6 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_5)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_5);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_6 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__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;

     0624:

    +0625:     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\n        start_later(seconds) -> None\n\n        Schedule the greenlet to run in the future loop iteration\n        *seconds* later\n        ");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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("start_later (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("start_later", 0);/* 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_XDECREF(__pyx_t_6);__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_tuple__36 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_seconds, __pyx_n_s_hub); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 625, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__36);__Pyx_GIVEREF(__pyx_tuple__36);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_21start_later, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_start_later, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_start_later, __pyx_t_2) < 0) __PYX_ERR(0, 625, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_start_later, 625, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 625, __pyx_L1_error)

     0626:         """

     0627:         start_later(seconds) -> None

     0628:

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

     0630:         *seconds* later

     0631:         """

    +0632:         if self._start_event is None:

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

    +0633:             _call_spawn_callbacks(self)

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

    +0634:             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, 634, __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;

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

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_hub->loop, __pyx_n_s_timer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 635, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_seconds};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__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;

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

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_start_event, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 636, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_switch); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 636, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__pyx_t_6 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_6)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_6);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __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;

     0637:

    +0638:     @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\n        add_spawn_callback(callback) -> None\n\n        Set up a *callback* to be invoked when :class:`Greenlet` objects\n        are started.\n\n        The invocation order of spawn callbacks is unspecified.  Adding the\n        same callback more than one time will not cause it to be called more\n        than once.\n\n        .. versionadded:: 1.4.0\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_23add_spawn_callback = {"add_spawn_callback", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("add_spawn_callback (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};#endifPyObject* values[1] = {0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 638, __pyx_L3_error)else goto __pyx_L5_argtuple_error;}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_spawn_callback") < 0)) __PYX_ERR(0, 638, __pyx_L3_error)}} else if (unlikely(__pyx_nargs != 1)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);}__pyx_v_callback = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("add_spawn_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 638, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("add_spawn_callback", 0);/* 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_tuple__38 = PyTuple_Pack(1, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 638, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__38);__Pyx_GIVEREF(__pyx_tuple__38);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_23add_spawn_callback, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_add_spawn_callback, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_add_spawn_callback, __pyx_t_2) < 0) __PYX_ERR(0, 638, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_n_s_add_spawn_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_add_spawn_callback, __pyx_t_3) < 0) __PYX_ERR(0, 638, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_add_spawn_callback, 638, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 638, __pyx_L1_error)

     0639:     def add_spawn_callback(callback):

     0640:         """

     0641:         add_spawn_callback(callback) -> None

     0642:

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

     0644:         are started.

     0645:

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

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

     0648:         than once.

     0649:

     0650:         .. versionadded:: 1.4.0

     0651:         """

     0652:         global _spawn_callbacks

    +0653:         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) {}

    +0654:             _spawn_callbacks = set()

    __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __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;

    +0655:         _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, 655, __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, 655, __pyx_L1_error)

     0656:

    +0657:     @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\n        remove_spawn_callback(callback) -> None\n\n        Remove *callback* function added with :meth:`Greenlet.add_spawn_callback`.\n        This function will not fail if *callback* has been already removed or\n        if *callback* was never added.\n\n        .. versionadded:: 1.4.0\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_25remove_spawn_callback = {"remove_spawn_callback", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("remove_spawn_callback (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0};#endifPyObject* values[1] = {0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 657, __pyx_L3_error)else goto __pyx_L5_argtuple_error;}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "remove_spawn_callback") < 0)) __PYX_ERR(0, 657, __pyx_L3_error)}} else if (unlikely(__pyx_nargs != 1)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);}__pyx_v_callback = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("remove_spawn_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 657, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("remove_spawn_callback", 0);/* 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_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_25remove_spawn_callback, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_remove_spawn_callback, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_remove_spawn_callback, __pyx_t_3) < 0) __PYX_ERR(0, 657, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_n_s_remove_spawn_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_remove_spawn_callback, __pyx_t_2) < 0) __PYX_ERR(0, 657, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_remove_spawn_callback, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 657, __pyx_L1_error)

     0658:     def remove_spawn_callback(callback):

     0659:         """

     0660:         remove_spawn_callback(callback) -> None

     0661:

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

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

     0664:         if *callback* was never added.

     0665:

     0666:         .. versionadded:: 1.4.0

     0667:         """

     0668:         global _spawn_callbacks

    +0669:         if _spawn_callbacks is not None:

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

    +0670:             _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, 670, __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, 670, __pyx_L1_error)

    +0671:             if not _spawn_callbacks:

    __pyx_t_1 = (__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks != Py_None)&&(PySet_GET_SIZE(__pyx_v_6gevent_17_gevent_cgreenlet__spawn_callbacks) != 0);__pyx_t_3 = (!__pyx_t_1);if (__pyx_t_3) {}

    +0672:                 _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);

     0673:

    +0674:     @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(type cls, *args, **kwargs)\n\n        spawn(function, *args, **kwargs) -> Greenlet\n\n        Create a new :class:`Greenlet` object and schedule it to run ``function(*args, **kwargs)``.\n        This can be used as ``gevent.spawn`` or ``Greenlet.spawn``.\n\n        The 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.\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_27spawn = {"spawn", (PyCFunction)(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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("spawn (wrapper)", 0);if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "spawn", 1))) return NULL;if (unlikely(__pyx_kwds)) {__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("spawn", 0);/* 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.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_tuple__41 = PyTuple_Pack(4, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_g); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 674, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__41);__Pyx_GIVEREF(__pyx_tuple__41);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_27spawn, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_spawn, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_spawn, __pyx_t_2) < 0) __PYX_ERR(0, 674, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_n_s_spawn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 674, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_spawn, __pyx_t_3) < 0) __PYX_ERR(0, 674, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_spawn, 674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 674, __pyx_L1_error)

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

     0676:         """

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

     0678:

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

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

     0681:

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

     0683:

     0684:         .. versionchanged:: 1.1b1

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

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

     0687:         """

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

    __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __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, 688, __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;

    +0689:         g.start()

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_3 = NULL;__pyx_t_4 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_1, function);__pyx_t_4 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_3, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;}__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0690:         return g

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

     0691:

    +0692:     @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(type cls, seconds, *args, **kwargs)\n\n        spawn_later(seconds, function, *args, **kwargs) -> Greenlet\n\n        Create and return a new `Greenlet` object scheduled to run ``function(*args, **kwargs)``\n        in a future loop iteration *seconds* later. This can be used as ``Greenlet.spawn_later``\n        or ``gevent.spawn_later``.\n\n        The 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.\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_29spawn_later = {"spawn_later", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("spawn_later (wrapper)", 0);__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);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_seconds,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seconds,0};#endifPyObject* values[1] = {0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {default:case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_seconds)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 692, __pyx_L3_error)else goto __pyx_L5_argtuple_error;}if (unlikely(kw_args > 0)) {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 (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values + 0, used_pos_args, "spawn_later") < 0)) __PYX_ERR(0, 692, __pyx_L3_error)}} else if (unlikely(__pyx_nargs < 1)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);}__pyx_v_seconds = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("spawn_later", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 692, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("spawn_later", 0);/* 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_tuple__43 = PyTuple_Pack(5, __pyx_n_s_cls, __pyx_n_s_seconds, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_g); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 692, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__43);__Pyx_GIVEREF(__pyx_tuple__43);__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_29spawn_later, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_spawn_later, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_spawn_later, __pyx_t_3) < 0) __PYX_ERR(0, 692, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet, __pyx_n_s_spawn_later); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_spawn_later, __pyx_t_2) < 0) __PYX_ERR(0, 692, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_spawn_later, 692, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 692, __pyx_L1_error)

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

     0694:         """

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

     0696:

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

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

     0699:         or ``gevent.spawn_later``.

     0700:

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

     0702:

     0703:         .. versionchanged:: 1.1b1

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

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

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

     0707:            when it started running.

     0708:         """

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

    __pyx_t_2 = (__pyx_v_cls == __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 = (PyTuple_GET_SIZE(__pyx_v_args) != 0);__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_n_s_run, __pyx_v_kwargs, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 709, __pyx_L1_error)__pyx_t_1 = __pyx_t_3;__pyx_L4_bool_binop_done:;if (unlikely(__pyx_t_1)) {}

    +0710:             raise TypeError("")

    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 710, __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, 710, __pyx_L1_error)__pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s__6); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 710, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__11);__Pyx_GIVEREF(__pyx_tuple__11);

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

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

    +0712:         g.start_later(seconds)

    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_start_later); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__pyx_t_6 = NULL;__pyx_t_7 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);if (likely(__pyx_t_6)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);__Pyx_INCREF(__pyx_t_6);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_4, function);__pyx_t_7 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_seconds};__pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 712, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;}__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +0713:         return g

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

     0714:

    +0715:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_maybe_kill_before_start", 0);/* Check if called by wrapper */if (unlikely(__pyx_skip_dispatch)) ;/* Check if overridden in Python */else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_maybe_kill_before_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start)) {__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_exception};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 715, __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_WriteUnraisable("gevent._gevent_cgreenlet.Greenlet._maybe_kill_before_start", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);__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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_maybe_kill_before_start (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("_maybe_kill_before_start", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__maybe_kill_before_start(__pyx_v_self, __pyx_v_exception, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __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._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_tuple__45 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_exception); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 715, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__45);__Pyx_GIVEREF(__pyx_tuple__45);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_31_maybe_kill_before_start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet__maybe_kill_before_star, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_maybe_kill_before_start, __pyx_t_2) < 0) __PYX_ERR(0, 715, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_maybe_kill_before_start, 715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 715, __pyx_L1_error)

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

    +0717:         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, 717, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0718:         self.__free()

    __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free(__pyx_v_self);

    +0719:         dead = self.dead

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dead); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_v_dead = __pyx_t_1;__pyx_t_1 = 0;

    +0720:         if dead:

    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_dead); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 720, __pyx_L1_error)if (__pyx_t_6) {}

    +0721:             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, 721, __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;}

    +0722:                 args = exception

    __Pyx_INCREF(__pyx_v_exception);__pyx_v_args = __pyx_v_exception;

     0723:             else:

    +0724:                 args = (exception,)

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

    +0725:             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, 725, __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, 725, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0726:         return dead

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

     0727:

    +0728:     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_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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("kill", 0);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 (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)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_kill); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_33kill)) {__Pyx_XDECREF(__pyx_r);__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_exception, __pyx_v_block, __pyx_v_timeout};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_r = __pyx_t_2;__pyx_t_2 = 0;__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;goto __pyx_L0;}#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));if (unlikely(__pyx_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\n        Raise the ``exception`` in the greenlet.\n\n        If ``block`` is ``True`` (the default), wait until the greenlet\n        dies or the optional timeout expires; this may require switching\n        greenlets.\n        If block is ``False``, the current greenlet is not unscheduled.\n\n        This function always returns ``None`` and never raises an error. It\n        may be called multpile times on the same greenlet object, and may be\n        called 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\n        See 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 :meth:`ready`, immediately return instead of\n            requiring a trip around the event loop.\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_33kill = {"kill", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("kill (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_exception,&__pyx_n_s_block,&__pyx_n_s_timeout,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exception,&__pyx_n_s_block,&__pyx_n_s_timeout,0};#endifPyObject* values[3] = {0,0,0};values[0] = __pyx_k__12;values[1] = ((PyObject *)Py_True);values[2] = ((PyObject *)Py_None);if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);CYTHON_FALLTHROUGH;case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exception);if (value) { values[0] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 728, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  1:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);if (value) { values[1] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 728, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  2:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);if (value) { values[2] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 728, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "kill") < 0)) __PYX_ERR(0, 728, __pyx_L3_error)}} else {switch (__pyx_nargs) {case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);CYTHON_FALLTHROUGH;case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}}__pyx_v_exception = values[0];__pyx_v_block = values[1];__pyx_v_timeout = values[2];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("kill", 0, 0, 3, __pyx_nargs); __PYX_ERR(0, 728, __pyx_L3_error)__pyx_L3_error:;__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 */__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_RefNannyDeclarations__Pyx_RefNannySetupContext("kill", 0);__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, 728, __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_k__12 = __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit;__Pyx_GIVEREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);__pyx_tuple__47 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_exception, __pyx_n_s_block, __pyx_n_s_timeout); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 728, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__47);__Pyx_GIVEREF(__pyx_tuple__47);__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);__Pyx_GIVEREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);__Pyx_INCREF(Py_True);__Pyx_GIVEREF(Py_True);PyTuple_SET_ITEM(__pyx_t_2, 1, Py_True);__Pyx_INCREF(Py_None);__Pyx_GIVEREF(Py_None);PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_33kill, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_kill, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_kill, __pyx_t_3) < 0) __PYX_ERR(0, 728, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_kill, 728, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 728, __pyx_L1_error)

     0729:         """

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

     0731:

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

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

     0734:         greenlets.

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

     0736:

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

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

     0739:         called on an unstarted or dead greenlet.

     0740:

     0741:         .. note::

     0742:

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

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

     0745:             immediately when this greenlet resumes execution. It may

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

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

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

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

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

     0751:             immediately is if this greenlet had called

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

     0753:

     0754:         .. caution::

     0755:

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

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

     0758:             unexpected exception could result in corrupted state. Using

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

     0760:             clean up resources.

     0761:

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

     0763:

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

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

     0766:             of the greenlet.

     0767:

     0768:         .. versionchanged:: 0.13.0

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

     0770:         .. versionchanged:: 1.1a2

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

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

     0773:             will still be executed, though.

     0774:         .. versionchanged:: 20.12.1

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

     0776:             requiring a trip around the event loop.

     0777:         """

    +0778:         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 (__pyx_t_6) {}

    +0779:             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 (__pyx_t_6) {}

    +0780:                 return

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

     0781:

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

    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 782, __pyx_L1_error)if (__pyx_t_6) {__pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_1 = __pyx_t_2;__pyx_t_2 = 0;} else {__Pyx_INCREF(Py_None);__pyx_t_1 = Py_None;}__pyx_v_waiter = __pyx_t_1;__pyx_t_1 = 0;

    +0783:             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, 783, __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;

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

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_hub->loop, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_kill_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 784, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_exception, __pyx_v_waiter};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 4+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __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;

    +0785:             if waiter is not None:

    __pyx_t_6 = (__pyx_v_waiter != Py_None);if (__pyx_t_6) {}

    +0786:                 waiter.get()

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_get_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_3, };__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __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;

    +0787:                 self.join(timeout)

    __pyx_t_7.__pyx_n = 1;__pyx_t_7.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_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     0788:

    +0789:     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\n        get(block=True, timeout=None) -> object\n\n        Return the result the greenlet has returned or re-raise the\n        exception it has raised.\n\n        If block is ``False``, raise :class:`gevent.Timeout` if the\n        greenlet is still alive. If block is ``True``, unschedule the\n        current greenlet until the result is available or the timeout\n        expires. In the latter case, :class:`gevent.Timeout` is\n        raised.\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_35get = {"get", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("get (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0};#endifPyObject* values[2] = {0,0};values[0] = ((PyObject *)Py_True);values[1] = ((PyObject *)Py_None);if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);if (value) { values[0] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 789, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  1:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);if (value) { values[1] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 789, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get") < 0)) __PYX_ERR(0, 789, __pyx_L3_error)}} else {switch (__pyx_nargs) {case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}}__pyx_v_block = values[0];__pyx_v_timeout = values[1];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("get", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 789, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("get", 0);/* 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_XDECREF(__pyx_t_10);__Pyx_XDECREF(__pyx_t_20);__Pyx_XDECREF(__pyx_t_21);__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_tuple__49 = PyTuple_Pack(6, __pyx_n_s_self_2, __pyx_n_s_block, __pyx_n_s_timeout, __pyx_n_s_switch, __pyx_n_s_t, __pyx_n_s_result); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 789, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__49);__Pyx_GIVEREF(__pyx_tuple__49);__pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_get_2, 789, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 789, __pyx_L1_error)__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_35get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_get, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 789, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__51);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_get_2, __pyx_t_3) < 0) __PYX_ERR(0, 789, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_tuple__51 = PyTuple_Pack(2, Py_True, Py_None); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 789, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__51);__Pyx_GIVEREF(__pyx_tuple__51);

     0790:         """

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

     0792:

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

     0794:         exception it has raised.

     0795:

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

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

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

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

     0800:         raised.

     0801:         """

    +0802:         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 (__pyx_t_1) {}

    +0803:             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 (__pyx_t_1) {}

    +0804:                 return self.value

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

    +0805:             self._raise_exception()

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raise_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __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;

    +0806:         if not block:

    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 806, __pyx_L1_error)__pyx_t_6 = (!__pyx_t_1);if (unlikely(__pyx_t_6)) {}

    +0807:             raise Timeout()

    __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout);__pyx_t_3 = __pyx_v_6gevent_17_gevent_cgreenlet_Timeout; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__Pyx_Raise(__pyx_t_2, 0, 0, 0);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__PYX_ERR(0, 807, __pyx_L1_error)

     0808:

    +0809:         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, 809, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_switch); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_v_switch = __pyx_t_3;__pyx_t_3 = 0;

    +0810:         self.rawlink(switch)

    __pyx_t_3 = ((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_3)) __PYX_ERR(0, 810, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +0811:         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_2); __pyx_t_2 = 0;__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;__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:;}

    +0812:             t = Timeout._start_new_or_dummy(timeout)

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout, __pyx_n_s_start_new_or_dummy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 812, __pyx_L6_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_timeout};__pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 812, __pyx_L6_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__pyx_v_t = __pyx_t_3;__pyx_t_3 = 0;

    +0813:             try:

    /*try:*/ {

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

    __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, 814, __pyx_L13_error)__Pyx_GOTREF(__pyx_t_3);__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_3)->__pyx_vtab)->__pyx_switch(((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)__pyx_t_3), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L13_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__pyx_v_result = __pyx_t_2;__pyx_t_2 = 0;

    +0815:                 if result is not self:

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

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

    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 816, __pyx_L13_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_v_result);__Pyx_GIVEREF(__pyx_v_result);PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_result);__pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_switch_into_Greenlet_get, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 816, __pyx_L13_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError);__pyx_t_3 = __pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError; __pyx_t_10 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_10)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_10);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_4};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L13_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__Pyx_Raise(__pyx_t_2, 0, 0, 0);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__PYX_ERR(0, 816, __pyx_L13_error)

     0817:             finally:

    +0818:                 t.cancel()

    /*finally:*/ {/*normal exit:*/{__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_cancel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L6_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L6_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__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_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 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;if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);__Pyx_XGOTREF(__pyx_t_13);__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_t_5 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;{__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_cancel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L17_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = NULL;__pyx_t_19 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_19 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_19, 0+__pyx_t_19);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L17_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_16);__Pyx_XGIVEREF(__pyx_t_17);__Pyx_XGIVEREF(__pyx_t_18);__Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);}__Pyx_XGIVEREF(__pyx_t_13);__Pyx_XGIVEREF(__pyx_t_14);__Pyx_XGIVEREF(__pyx_t_15);__Pyx_ErrRestore(__pyx_t_13, __pyx_t_14, __pyx_t_15);__pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;__pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;goto __pyx_L6_error;__pyx_L17_error:;if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_16);__Pyx_XGIVEREF(__pyx_t_17);__Pyx_XGIVEREF(__pyx_t_18);__Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);}__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;__Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;__pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;goto __pyx_L6_error;}__pyx_L14:;}

    +0819:         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_4) < 0) __PYX_ERR(0, 819, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_GOTREF(__pyx_t_3);__Pyx_GOTREF(__pyx_t_4);

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

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

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

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

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

    +0825:             self.unlink(switch)

    __pyx_t_20 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unlink); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 825, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_20);__pyx_t_21 = NULL;__pyx_t_11 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_20))) {__pyx_t_21 = PyMethod_GET_SELF(__pyx_t_20);if (likely(__pyx_t_21)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);__Pyx_INCREF(__pyx_t_21);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_20, function);__pyx_t_11 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_v_switch};__pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_20, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);__Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 825, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_10);__Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;}__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    +0826:             raise

    __Pyx_GIVEREF(__pyx_t_2);__Pyx_GIVEREF(__pyx_t_3);__Pyx_XGIVEREF(__pyx_t_4);__Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_4);__pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __PYX_ERR(0, 826, __pyx_L8_except_error)}__pyx_L8_except_error:;

     0827:

    +0828:         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 (__pyx_t_6) {}

    +0829:             if self.successful():

    __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_17_gevent_cgreenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->successful(__pyx_v_self, 0);if (__pyx_t_6) {}

    +0830:                 return self.value

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

    +0831:             self._raise_exception()

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raise_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = NULL;__pyx_t_11 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {__pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_2)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_2);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_11 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_2, };__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     0832:

    +0833:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("join", 0);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 (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)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_37join)) {__Pyx_XDECREF(__pyx_r);__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_timeout};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_r = __pyx_t_2;__pyx_t_2 = 0;__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;goto __pyx_L0;}#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));if (unlikely(__pyx_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_19);__Pyx_XDECREF(__pyx_t_20);__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\n        join(timeout=None) -> None\n\n        Wait until the greenlet finishes or *timeout* expires. Return\n        ``None`` regardless.\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_37join = {"join", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("join (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0};#endifPyObject* values[1] = {0};values[0] = ((PyObject *)Py_None);if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);if (value) { values[0] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "join") < 0)) __PYX_ERR(0, 833, __pyx_L3_error)}} else {switch (__pyx_nargs) {case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}}__pyx_v_timeout = values[0];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("join", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 833, __pyx_L3_error)__pyx_L3_error:;__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 */__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_RefNannyDeclarations__Pyx_RefNannySetupContext("join", 0);__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, 833, __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_tuple__52 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_timeout); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 833, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__52);__Pyx_GIVEREF(__pyx_tuple__52);__pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_join, 833, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 833, __pyx_L1_error)__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_37join, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_join, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 833, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__54);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_join, __pyx_t_3) < 0) __PYX_ERR(0, 833, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_tuple__54 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 833, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__54);__Pyx_GIVEREF(__pyx_tuple__54);

     0834:         """

     0835:         join(timeout=None) -> None

     0836:

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

     0838:         ``None`` regardless.

     0839:         """

    +0840:         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 (__pyx_t_6) {}

    +0841:             return

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

     0842:

    +0843:         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, 843, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_switch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __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;

    +0844:         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, 844, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +0845:         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_2); __pyx_t_2 = 0;__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;__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:;}

    +0846:             t = Timeout._start_new_or_dummy(timeout)

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout, __pyx_n_s_start_new_or_dummy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L4_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_3 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_1, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_timeout};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L4_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;}__pyx_v_t = __pyx_t_2;__pyx_t_2 = 0;

    +0847:             try:

    /*try:*/ {

    +0848:                 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, 848, __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, 848, __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;

    +0849:                 if result is not self:

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

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

    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L11_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_v_result);__Pyx_GIVEREF(__pyx_v_result);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_result);__pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_switch_into_Greenlet_joi, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L11_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError);__pyx_t_2 = __pyx_v_6gevent_17_gevent_cgreenlet_InvalidSwitchError; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L11_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__Pyx_Raise(__pyx_t_1, 0, 0, 0);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__PYX_ERR(0, 850, __pyx_L11_error)

     0851:             finally:

    +0852:                 t.cancel()

    /*finally:*/ {/*normal exit:*/{__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L4_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_3, };__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L4_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;goto __pyx_L12;}__pyx_L11_error:;/*exception exit:*/{__Pyx_PyThreadState_declare__Pyx_PyThreadState_assign__pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 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_3); __pyx_t_3 = 0;__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);__Pyx_XGOTREF(__pyx_t_12);__Pyx_XGOTREF(__pyx_t_13);__Pyx_XGOTREF(__pyx_t_14);__Pyx_XGOTREF(__pyx_t_15);__Pyx_XGOTREF(__pyx_t_16);__Pyx_XGOTREF(__pyx_t_17);__pyx_t_5 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename;{__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L15_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = NULL;__pyx_t_18 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_18 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_3, };__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_18, 0+__pyx_t_18);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L15_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;}if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_15);__Pyx_XGIVEREF(__pyx_t_16);__Pyx_XGIVEREF(__pyx_t_17);__Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);}__Pyx_XGIVEREF(__pyx_t_12);__Pyx_XGIVEREF(__pyx_t_13);__Pyx_XGIVEREF(__pyx_t_14);__Pyx_ErrRestore(__pyx_t_12, __pyx_t_13, __pyx_t_14);__pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;__pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11;goto __pyx_L4_error;__pyx_L15_error:;if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_15);__Pyx_XGIVEREF(__pyx_t_16);__Pyx_XGIVEREF(__pyx_t_17);__Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);}__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;__Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;__pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0;goto __pyx_L4_error;}__pyx_L12:;}

    +0853:         except Timeout as ex:

    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout);if (__pyx_t_10) {__Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename);if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 853, __pyx_L6_except_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_GOTREF(__pyx_t_2);__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_t_2);__pyx_v_ex = __pyx_t_2;/*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_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0;__Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12);if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);__Pyx_XGOTREF(__pyx_t_17);__Pyx_XGOTREF(__pyx_t_16);__Pyx_XGOTREF(__pyx_t_15);__Pyx_XGOTREF(__pyx_t_14);__Pyx_XGOTREF(__pyx_t_13);__Pyx_XGOTREF(__pyx_t_12);__pyx_t_10 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_21 = __pyx_filename;{__Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0;}if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_14);__Pyx_XGIVEREF(__pyx_t_13);__Pyx_XGIVEREF(__pyx_t_12);__Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_12);}__Pyx_XGIVEREF(__pyx_t_17);__Pyx_XGIVEREF(__pyx_t_16);__Pyx_XGIVEREF(__pyx_t_15);__Pyx_ErrRestore(__pyx_t_17, __pyx_t_16, __pyx_t_15);__pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0;__pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_21;goto __pyx_L6_except_error;}__pyx_L22:;}__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_L5_exception_handled;}

    +0854:             self.unlink(switch)

    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unlink); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 854, __pyx_L21_error)__Pyx_GOTREF(__pyx_t_19);__pyx_t_20 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {__pyx_t_20 = PyMethod_GET_SELF(__pyx_t_19);if (likely(__pyx_t_20)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);__Pyx_INCREF(__pyx_t_20);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_19, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_v_switch};__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L21_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;}__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +0855:             if ex is not t:

    if (unlikely(!__pyx_v_t)) { __Pyx_RaiseUnboundLocalError("t"); __PYX_ERR(0, 855, __pyx_L21_error) }__pyx_t_6 = (__pyx_v_ex != __pyx_v_t);if (unlikely(__pyx_t_6)) {}}

    +0856:                 raise

    __Pyx_GIVEREF(__pyx_t_1);__Pyx_GIVEREF(__pyx_t_2);__Pyx_XGIVEREF(__pyx_t_3);__Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_3);__pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 856, __pyx_L21_error)

    +0857:         except:

    /*except:*/ {__Pyx_AddTraceback("gevent._gevent_cgreenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename);if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 857, __pyx_L6_except_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_GOTREF(__pyx_t_2);__Pyx_GOTREF(__pyx_t_1);

    +0858:             self.unlink(switch)

    __pyx_t_19 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unlink); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 858, __pyx_L6_except_error)__Pyx_GOTREF(__pyx_t_19);__pyx_t_20 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_19))) {__pyx_t_20 = PyMethod_GET_SELF(__pyx_t_19);if (likely(__pyx_t_20)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);__Pyx_INCREF(__pyx_t_20);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_19, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_v_switch};__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 858, __pyx_L6_except_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;}__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +0859:             raise

    __Pyx_GIVEREF(__pyx_t_3);__Pyx_GIVEREF(__pyx_t_2);__Pyx_XGIVEREF(__pyx_t_1);__Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_1);__pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __PYX_ERR(0, 859, __pyx_L6_except_error)}__pyx_L6_except_error:;

     0860:

    +0861:     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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__enter__", 0);/* 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_n_s_Greenlet___enter, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 861, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_enter, __pyx_t_3) < 0) __PYX_ERR(0, 861, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_enter, 861, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 861, __pyx_L1_error)

    +0862:         return self

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

     0863:

    +0864:     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*)(__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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_v,&__pyx_n_s_tb,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_v,&__pyx_n_s_tb,0};#endifPyObject* values[3] = {0,0,0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);CYTHON_FALLTHROUGH;case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_t)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L3_error)else goto __pyx_L5_argtuple_error;CYTHON_FALLTHROUGH;case  1:if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_v)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L3_error)else {__Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 864, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  2:if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_tb)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 864, __pyx_L3_error)else {__Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 864, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 864, __pyx_L3_error)}} else if (unlikely(__pyx_nargs != 3)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);}__pyx_v_t = values[0];__pyx_v_v = values[1];__pyx_v_tb = values[2];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 864, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__exit__", 0);/* 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_tuple__56 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_t, __pyx_n_s_v, __pyx_n_s_tb); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 864, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__56);__Pyx_GIVEREF(__pyx_tuple__56);__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_41__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet___exit, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_exit, __pyx_t_3) < 0) __PYX_ERR(0, 864, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_exit, 864, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 864, __pyx_L1_error)

    +0865:         if t is None:

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

    +0866:             try:

    /*try:*/ {

    +0867:                 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, 867, __pyx_L5_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}

     0868:             finally:

    +0869:                 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, 869, __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;if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);if ((PY_MAJOR_VERSION < 3) || 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, 869, __pyx_L8_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}if (PY_MAJOR_VERSION >= 3) {__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:;if (PY_MAJOR_VERSION >= 3) {__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:;}

     0870:         else:

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

    /*else*/ {__pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_v_t);__Pyx_GIVEREF(__pyx_v_t);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_t);__Pyx_INCREF(__pyx_v_v);__Pyx_GIVEREF(__pyx_v_v);PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_v);__Pyx_INCREF(__pyx_v_tb);__Pyx_GIVEREF(__pyx_v_tb);PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_tb);__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, 871, __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:;

     0872:

    +0873:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__report_result", 0);/* 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_XDECREF(__pyx_t_7);__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;}

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

    __Pyx_INCREF(__pyx_tuple__13);__Pyx_GIVEREF(__pyx_tuple__13);__Pyx_GOTREF(__pyx_v_self->_exc_info);__Pyx_DECREF(__pyx_v_self->_exc_info);__pyx_v_self->_exc_info = __pyx_tuple__13;__pyx_tuple__13 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 874, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__13);__Pyx_GIVEREF(__pyx_tuple__13);

    +0875:         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;

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

    __pyx_t_2 = (__pyx_v_self->_links != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_links) != 0);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, 876, __pyx_L1_error)__pyx_t_3 = (!__pyx_t_2);__pyx_t_1 = __pyx_t_3;__pyx_L4_bool_binop_done:;if (__pyx_t_1) {}

    +0877:             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, 877, __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;

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

    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_hub->loop, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 878, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_notify_links); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_6);__pyx_t_7 = NULL;__pyx_t_8 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);if (likely(__pyx_t_7)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);__Pyx_INCREF(__pyx_t_7);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_5, function);__pyx_t_8 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;}__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;

     0879:

    +0880:     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_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__report_error", 0);__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;}

    +0881:         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, 881, __pyx_L1_error)}__pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 881, __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, 881, __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) {}

    +0882:             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, 882, __pyx_L1_error)}__pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __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, 882, __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;

    +0883:             return

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

     0884:

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

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

    +0887:         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_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:;}

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

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

    +0889:         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_2) < 0) __PYX_ERR(0, 889, __pyx_L6_except_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_GOTREF(__pyx_t_7);__Pyx_GOTREF(__pyx_t_2);

    +0890:             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_2); __pyx_t_2 = 0;goto __pyx_L5_exception_handled;}__pyx_L6_except_error:;

    +0891:         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, 891, __pyx_L1_error)}__pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (unlikely(__pyx_v_exc_info == Py_None)) {PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");__PYX_ERR(0, 891, __pyx_L1_error)}__pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 891, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_7);__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 891, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_GIVEREF(__pyx_t_2);PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);__Pyx_GIVEREF(__pyx_t_7);PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);__Pyx_INCREF(__pyx_v_tb);__Pyx_GIVEREF(__pyx_v_tb);PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_tb);__pyx_t_2 = 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;

     0892:

    +0893:         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, 893, __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;

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

    __pyx_t_10 = (__pyx_v_self->_links != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_links) != 0);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, 894, __pyx_L1_error)__pyx_t_11 = (!__pyx_t_10);__pyx_t_3 = __pyx_t_11;__pyx_L13_bool_binop_done:;if (__pyx_t_3) {}

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

    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_hub->loop, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 895, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_7);__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_notify_links); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_8 = NULL;__pyx_t_9 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);if (likely(__pyx_t_8)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);__Pyx_INCREF(__pyx_t_8);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_7, function);__pyx_t_9 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_2};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;}__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;

     0896:

    +0897:         try:

    /*try:*/ {

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

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_hub), __pyx_n_s_handle_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L16_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L16_error)__Pyx_GOTREF(__pyx_t_7);__Pyx_INCREF((PyObject *)__pyx_v_self);__Pyx_GIVEREF((PyObject *)__pyx_v_self);PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_self));if (unlikely(__pyx_v_exc_info == Py_None)) {PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");__PYX_ERR(0, 898, __pyx_L16_error)}__pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_v_exc_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L16_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;__pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 898, __pyx_L16_error)__Pyx_GOTREF(__pyx_t_7);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;}

     0899:         finally:

    +0900:             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_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_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_14);__Pyx_XGOTREF(__pyx_t_15);__Pyx_XGOTREF(__pyx_t_16);__pyx_t_9 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;{__Pyx_DECREF(__pyx_v_exc_info); __pyx_v_exc_info = 0;}if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_14);__Pyx_XGIVEREF(__pyx_t_15);__Pyx_XGIVEREF(__pyx_t_16);__Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);}__Pyx_XGIVEREF(__pyx_t_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_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;__pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;goto __pyx_L1_error;}__pyx_L17:;}

     0901:

    +0902:     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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("run (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("run", 0);/* 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_tuple__58 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_result); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 902, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__58);__Pyx_GIVEREF(__pyx_tuple__58);__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_43run, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_run, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_run, __pyx_t_3) < 0) __PYX_ERR(0, 902, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_run, 902, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 902, __pyx_L1_error)

    +0903:         try:

    /*try:*/ {

    +0904:             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, 904, __pyx_L4_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +0905:             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);

     0906:

    +0907:             try:

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

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

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __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, 908, __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, 908, __pyx_L6_error)}__pyx_t_5 = PyDict_Copy(__pyx_v_self->kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 908, __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, 908, __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;

    +0909:             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, 909, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_6);__Pyx_GOTREF(__pyx_t_5);__Pyx_GOTREF(__pyx_t_1);

    +0910:                 self.__report_error(sys_exc_info())

    __Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);__pyx_t_8 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info; __pyx_t_9 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_9)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_9);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_9, };__pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 910, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_7);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}if (!(likely(PyTuple_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_7))) __PYX_ERR(0, 910, __pyx_L8_except_error)__pyx_t_8 = __pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__report_error(__pyx_v_self, ((PyObject*)__pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 910, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_8);__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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;}__pyx_L8_except_error:;

     0911:             else:

    +0912:                 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, 912, __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;

     0913:         finally:

    +0914:             self.__free()

    /*finally:*/ {/*normal exit:*/{__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free(__pyx_v_self);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_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 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;if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);if ((PY_MAJOR_VERSION < 3) || 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_13);__Pyx_XGOTREF(__pyx_t_14);__Pyx_XGOTREF(__pyx_t_15);__pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename;{__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet__Greenlet__free(__pyx_v_self);}if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_13);__Pyx_XGIVEREF(__pyx_t_14);__Pyx_XGIVEREF(__pyx_t_15);__Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);}__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_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;__pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12;goto __pyx_L1_error;}__pyx_L5:;}

     0915:

    +0916:     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) {__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_Greenlet__free", 0);/* function exit code */goto __pyx_L0;__pyx_L1_error:;__Pyx_WriteUnraisable("gevent._gevent_cgreenlet.Greenlet._Greenlet__free", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);__pyx_L0:;__Pyx_RefNannyFinishContext();}

    +0917:         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_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:;}

     0918:             # It seems that Cython 0.29.13 sometimes miscompiles

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

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

     0921:             # exceptions from places that subclassed Greenlet.

    +0922:             del self._run

    if (__Pyx_PyObject_DelAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_run_2) < 0) __PYX_ERR(0, 922, __pyx_L3_error)

    +0923:         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;__pyx_L5_except_error:;

     0924:             pass

    +0925:         self.args = ()

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

    +0926:         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, 926, __pyx_L1_error)}__pyx_t_5 = __Pyx_PyDict_Clear(__pyx_v_self->kwargs); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 926, __pyx_L1_error)

     0927:

    +0928:     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\n        Subclasses may override this method to take any number of\n        arguments 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.\n        ");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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_run (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_run", 0);/* 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_n_s_Greenlet__run, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 928, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_run_2, __pyx_t_3) < 0) __PYX_ERR(0, 928, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_run_2, 928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 928, __pyx_L1_error)

     0929:         """

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

     0931:         arguments and keyword arguments.

     0932:

     0933:         .. versionadded:: 1.1a3

     0934:             Previously, if no callable object was

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

     0936:             fail with an AttributeError.

     0937:         """

     0938:         # We usually override this in __init__

     0939:         # pylint: disable=method-hidden

    +0940:         return

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

     0941:

    +0942:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("has_links", 0);/* Check if called by wrapper */if (unlikely(__pyx_skip_dispatch)) ;/* Check if overridden in Python */else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_has_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_47has_links)) {__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 942, __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_WriteUnraisable("gevent._gevent_cgreenlet.Greenlet.has_links", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);__pyx_r = 0;__pyx_L0:;__Pyx_RefNannyFinishContext();return __pyx_r;}/* Python wrapper */static PyObject *__pyx_pw_6gevent_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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("has_links (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("has_links", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_6gevent_17_gevent_cgreenlet_8Greenlet_has_links(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __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.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_n_s_Greenlet_has_links, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_has_links, __pyx_t_3) < 0) __PYX_ERR(0, 942, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_has_links, 942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 942, __pyx_L1_error)

    +0943:         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, 943, __pyx_L1_error)}__pyx_t_7 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 943, __pyx_L1_error)__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__pyx_r = __pyx_t_7;goto __pyx_L0;

     0944:

    +0945:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("rawlink", 0);/* Check if called by wrapper */if (unlikely(__pyx_skip_dispatch)) ;/* Check if overridden in Python */else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_rawlink); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink)) {__Pyx_XDECREF(__pyx_r);__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_callback};__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_r = __pyx_t_2;__pyx_t_2 = 0;__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;goto __pyx_L0;}#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));if (unlikely(__pyx_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.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\n        Register a callable to be executed when the greenlet finishes\n        execution.\n\n        The *callback* will be called with this instance as an\n        argument.\n\n        The *callback* will be called even if linked after the greenlet\n        is already ready().\n\n        .. caution::\n            The *callback* will be called in the hub and\n            **MUST NOT** raise an exception.\n        ");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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("rawlink (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("rawlink", 0);__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, 945, __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_tuple__62 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_callback); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 945, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__62);__Pyx_GIVEREF(__pyx_tuple__62);__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_49rawlink, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_rawlink, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_rawlink, __pyx_t_3) < 0) __PYX_ERR(0, 945, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_rawlink, 945, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 945, __pyx_L1_error)

     0946:         """

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

     0948:         execution.

     0949:

     0950:         The *callback* will be called with this instance as an

     0951:         argument.

     0952:

     0953:         The *callback* will be called even if linked after the greenlet

     0954:         is already ready().

     0955:

     0956:         .. caution::

     0957:             The *callback* will be called in the hub and

     0958:             **MUST NOT** raise an exception.

     0959:         """

    +0960:         if not callable(callback):

    __pyx_t_6 = __Pyx_PyCallable_Check(__pyx_v_callback); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 960, __pyx_L1_error)__pyx_t_7 = (!__pyx_t_6);if (unlikely(__pyx_t_7)) {}

    +0961:             raise TypeError('Expected callable: %r' % (callback, ))

    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_INCREF(__pyx_v_callback);__Pyx_GIVEREF(__pyx_v_callback);PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_callback);__pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Expected_callable_r, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_Raise(__pyx_t_1, 0, 0, 0);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__PYX_ERR(0, 961, __pyx_L1_error)

    +0962:         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, 962, __pyx_L1_error)}__pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->_links, __pyx_v_callback); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 962, __pyx_L1_error)

    +0963:         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 (__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)&&(PyList_GET_SIZE(__pyx_v_self->_links) != 0);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, 963, __pyx_L1_error)__pyx_t_9 = (!__pyx_t_6);__pyx_t_7 = __pyx_t_9;__pyx_L5_bool_binop_done:;if (__pyx_t_7) {}

    +0964:             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, 964, __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;

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

    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_hub->loop, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 965, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_notify_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 965, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__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;

     0966:

    +0967:     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\n        Link greenlet's completion to a callable.\n\n        The *callback* will be called with this instance as an\n        argument once this greenlet is dead. A callable is called in\n        its own :class:`greenlet.greenlet` (*not* a\n        :class:`Greenlet`).\n\n        The *callback* will be called even if linked after the greenlet\n        is already ready().\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_51link = {"link", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("link (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0};#endifPyObject* values[2] = {0,0};values[1] = __pyx_k__14;if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L3_error)else goto __pyx_L5_argtuple_error;CYTHON_FALLTHROUGH;case  1:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_SpawnedLink);if (value) { values[1] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 967, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "link") < 0)) __PYX_ERR(0, 967, __pyx_L3_error)}} else {switch (__pyx_nargs) {case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);break;default: goto __pyx_L5_argtuple_error;}}__pyx_v_callback = values[0];__pyx_v_SpawnedLink = values[1];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("link", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 967, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("link", 0);/* 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_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);__pyx_k__14 = ((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);__Pyx_GIVEREF(__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);__pyx_tuple__64 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_callback, __pyx_n_s_SpawnedLink); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 967, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__64);__Pyx_GIVEREF(__pyx_tuple__64);__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);__Pyx_GIVEREF((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink);PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SpawnedLink));__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_51link, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_link, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_link, __pyx_t_2) < 0) __PYX_ERR(0, 967, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_link, 967, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 967, __pyx_L1_error)

     0968:         """

     0969:         Link greenlet's completion to a callable.

     0970:

     0971:         The *callback* will be called with this instance as an

     0972:         argument once this greenlet is dead. A callable is called in

     0973:         its own :class:`greenlet.greenlet` (*not* a

     0974:         :class:`Greenlet`).

     0975:

     0976:         The *callback* will be called even if linked after the greenlet

     0977:         is already ready().

     0978:         """

     0979:         # XXX: Is the redefinition of SpawnedLink supposed to just be an

     0980:         # optimization, or do people use it? It's not documented

     0981:         # pylint:disable=redefined-outer-name

    +0982:         self.rawlink(SpawnedLink(callback))

    __Pyx_INCREF(__pyx_v_SpawnedLink);__pyx_t_2 = __pyx_v_SpawnedLink; __pyx_t_3 = NULL;__pyx_t_4 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_4 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_callback};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__pyx_t_2 = ((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_2)) __PYX_ERR(0, 982, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     0983:

    +0984:     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)\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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("unlink (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("unlink", 0);/* 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.unlink", __pyx_clineno, __pyx_lineno, __pyx_filename);__pyx_r = NULL;__pyx_L0:;__Pyx_XGIVEREF(__pyx_r);__Pyx_RefNannyFinishContext();return __pyx_r;}__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_53unlink, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_unlink, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 984, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_unlink, __pyx_t_2) < 0) __PYX_ERR(0, 984, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_unlink, 984, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 984, __pyx_L1_error)

     0985:         """Remove the callback set by :meth:`link` or :meth:`rawlink`"""

    +0986:         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_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:;}

    +0987:             self._links.remove(callback) # pylint:disable=no-member

    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_links, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L3_error)__Pyx_GOTREF(__pyx_t_5);__pyx_t_6 = NULL;__pyx_t_7 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {__pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);if (likely(__pyx_t_6)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);__Pyx_INCREF(__pyx_t_6);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_5, function);__pyx_t_7 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_callback};__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L3_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;}__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +0988:         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;__pyx_L5_except_error:;

     0989:             pass

     0990:

    +0991:     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\n        Remove all the callbacks.\n\n        .. versionadded:: 1.3a2\n        ");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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("unlink_all (wrapper)", 0);__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("unlink_all", 0);/* 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_55unlink_all, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_unlink_all, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 991, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_unlink_all, __pyx_t_2) < 0) __PYX_ERR(0, 991, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_unlink_all, 991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 991, __pyx_L1_error)

     0992:         """

     0993:         Remove all the callbacks.

     0994:

     0995:         .. versionadded:: 1.3a2

     0996:         """

    +0997:         del self._links[:]

    if (unlikely(__pyx_v_self->_links == Py_None)) {PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");__PYX_ERR(0, 997, __pyx_L1_error)}if (__Pyx_PyObject_DelSlice(__pyx_v_self->_links, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 997, __pyx_L1_error)

     0998:

    +0999:     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\n        Like :meth:`link` but *callback* is only notified when the greenlet\n        has completed successfully.\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_57link_value = {"link_value", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("link_value (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0};#endifPyObject* values[2] = {0,0};values[1] = __pyx_k__15;if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L3_error)else goto __pyx_L5_argtuple_error;CYTHON_FALLTHROUGH;case  1:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_SpawnedLink);if (value) { values[1] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 999, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "link_value") < 0)) __PYX_ERR(0, 999, __pyx_L3_error)}} else {switch (__pyx_nargs) {case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);break;default: goto __pyx_L5_argtuple_error;}}__pyx_v_callback = values[0];__pyx_v_SpawnedLink = values[1];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("link_value", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 999, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("link_value", 0);/* 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.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_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);__pyx_k__15 = ((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);__Pyx_GIVEREF(__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);__Pyx_GIVEREF((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink);PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_SuccessSpawnedLink));__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_57link_value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_link_value, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_link_value, __pyx_t_3) < 0) __PYX_ERR(0, 999, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_link_value, 999, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 999, __pyx_L1_error)

     1000:         """

     1001:         Like :meth:`link` but *callback* is only notified when the greenlet

     1002:         has completed successfully.

     1003:         """

     1004:         # pylint:disable=redefined-outer-name

    +1005:         self.link(callback, SpawnedLink=SpawnedLink)

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_link); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_v_callback);__Pyx_GIVEREF(__pyx_v_callback);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_callback);__pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_SpawnedLink, __pyx_v_SpawnedLink) < 0) __PYX_ERR(0, 1005, __pyx_L1_error)__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1005, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     1006:

    +1007:     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\n        Like :meth:`link` but *callback* is only notified when the\n        greenlet dies because of an unhandled exception.\n        ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_59link_exception = {"link_exception", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("link_exception (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0};#endifPyObject* values[2] = {0,0};values[1] = __pyx_k__16;if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L3_error)else goto __pyx_L5_argtuple_error;CYTHON_FALLTHROUGH;case  1:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_SpawnedLink);if (value) { values[1] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "link_exception") < 0)) __PYX_ERR(0, 1007, __pyx_L3_error)}} else {switch (__pyx_nargs) {case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);break;default: goto __pyx_L5_argtuple_error;}}__pyx_v_callback = values[0];__pyx_v_SpawnedLink = values[1];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("link_exception", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1007, __pyx_L3_error)__pyx_L3_error:;__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 */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("link_exception", 0);/* 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.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_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);__pyx_k__16 = ((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);__Pyx_GIVEREF(__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1007, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);__Pyx_GIVEREF((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink);PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_FailureSpawnedLink));__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_59link_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_link_exception, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_3);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_link_exception, __pyx_t_2) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_link_exception, 1007, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1007, __pyx_L1_error)

     1008:         """

     1009:         Like :meth:`link` but *callback* is only notified when the

     1010:         greenlet dies because of an unhandled exception.

     1011:         """

     1012:         # pylint:disable=redefined-outer-name

    +1013:         self.link(callback, SpawnedLink=SpawnedLink)

    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_link); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1013, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_v_callback);__Pyx_GIVEREF(__pyx_v_callback);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_callback);__pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1013, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_SpawnedLink, __pyx_v_SpawnedLink) < 0) __PYX_ERR(0, 1013, __pyx_L1_error)__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1013, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     1014:

    +1015:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_notify_links", 0);/* Check if called by wrapper */if (unlikely(__pyx_skip_dispatch)) ;/* Check if overridden in Python */else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTSstatic 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_n_s_notify_links); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1015, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);#ifdef __Pyx_CyFunction_USEDif (!__Pyx_IsCyOrPyCFunction(__pyx_t_1)#elseif (!PyCFunction_Check(__pyx_t_1)#endif        || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links)) {__Pyx_XDECREF(__pyx_r);__Pyx_INCREF(__pyx_t_1);__pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_3, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_4, };__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;}__pyx_r = __pyx_t_2;__pyx_t_2 = 0;__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;goto __pyx_L0;}#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS__pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));__pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));if (unlikely(__pyx_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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_notify_links (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("_notify_links", 0);__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, 1015, __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_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_8Greenlet_61_notify_links, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet__notify_links, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1015, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet->tp_dict, __pyx_n_s_notify_links, __pyx_t_2) < 0) __PYX_ERR(0, 1015, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet_Greenlet);__pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_notify_links, 1015, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1015, __pyx_L1_error)

    +1016:         while self._links:

    while (1) {__pyx_t_6 = (__pyx_v_self->_links != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_links) != 0);if (!__pyx_t_6) break;

     1017:             # Early links are allowed to remove later links

     1018:             # before we get to them, and they're also allowed to

     1019:             # add new links, so we have to be careful about iterating.

     1020:

     1021:             # We don't expect this list to be very large, so the time spent

     1022:             # manipulating it should be small. a deque is probably not justified.

     1023:             # Cython has optimizations to transform this into a memmove anyway.

    +1024:             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, 1024, __pyx_L1_error)}__pyx_t_1 = __Pyx_PyList_PopIndex(__pyx_v_self->_links, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_1);__pyx_t_1 = 0;

    +1025:             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_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:;}}

    +1026:                 link(self)

    __Pyx_INCREF(__pyx_v_link);__pyx_t_2 = __pyx_v_link; __pyx_t_3 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {__pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);if (likely(__pyx_t_3)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);__Pyx_INCREF(__pyx_t_3);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_2, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L5_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;}__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1027:             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_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1027, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_GOTREF(__pyx_t_2);__Pyx_GOTREF(__pyx_t_3);

    +1028:                 get_my_hub(self).handle_error((link, self), *sys_exc_info())

    __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, 1028, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_4);__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_handle_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1028, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_10);__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;__pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_INCREF(__pyx_v_link);__Pyx_GIVEREF(__pyx_v_link);PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_link);__Pyx_INCREF((PyObject *)__pyx_v_self);__Pyx_GIVEREF((PyObject *)__pyx_v_self);PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_self));__pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1028, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_11);__Pyx_GIVEREF(__pyx_t_4);PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);__pyx_t_4 = 0;__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);__pyx_t_12 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info; __pyx_t_13 = NULL;__pyx_t_5 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {__pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);if (likely(__pyx_t_13)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);__Pyx_INCREF(__pyx_t_13);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_12, function);__pyx_t_5 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_13, };__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;}__pyx_t_12 = __Pyx_PySequence_Tuple(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1028, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_12);__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;__pyx_t_4 = PyNumber_Add(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;__pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1028, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_12);__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;goto __pyx_L6_exception_handled;}__pyx_L7_except_error:;

     1029:

     1030:

    +1031: 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;

    +1032:     __slots__ = ('pending', 'active')

    if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event->tp_dict, __pyx_n_s_slots, __pyx_tuple__71) < 0) __PYX_ERR(0, 1032, __pyx_L1_error)PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event);__pyx_tuple__71 = PyTuple_Pack(2, __pyx_n_s_pending, __pyx_n_s_active); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 1032, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__71);__Pyx_GIVEREF(__pyx_tuple__71);

     1033:

    +1034:     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 const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);int __pyx_r;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);if (unlikely(__pyx_nargs > 0)) {__Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("__init__", 0);/* function exit code */__pyx_r = 0;__Pyx_RefNannyFinishContext();return __pyx_r;}

    +1035:         self.pending = self.active = False

    __pyx_v_self->pending = 0;__pyx_v_self->active = 0;

     1036:

    +1037:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("stop", 0);/* 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("stop (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("stop", 0);__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, 1037, __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_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_3stop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_dummy_event_stop, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event->tp_dict, __pyx_n_s_stop, __pyx_t_2) < 0) __PYX_ERR(0, 1037, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event);__pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_stop, 1037, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 1037, __pyx_L1_error)

     1038:         pass

     1039:

    +1040:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("start", 0);/* 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 = 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("start (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("start", 0);__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, 1040, __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_tuple__73 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_cb); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1040, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__73);__Pyx_GIVEREF(__pyx_tuple__73);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_dummy_event_start, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event->tp_dict, __pyx_n_s_start, __pyx_t_2) < 0) __PYX_ERR(0, 1040, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event);__pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_start, 1040, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1040, __pyx_L1_error)

    +1041:         raise AssertionError("Cannot start the dummy event")

    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AssertionError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __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, 1041, __pyx_L1_error)__pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Cannot_start_the_dummy_event); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1041, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__17);__Pyx_GIVEREF(__pyx_tuple__17);

     1042:

    +1043:     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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("close", 0);/* 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 = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("close (wrapper)", 0);__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_RefNannyDeclarations__Pyx_RefNannySetupContext("close", 0);__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, 1043, __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_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_12_dummy_event_7close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_dummy_event_close, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event->tp_dict, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(0, 1043, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;PyType_Modified(__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event);__pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_close, 1043, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 1043, __pyx_L1_error)

     1044:         pass

     1045:

    +1046: _cancelled_start_event = _dummy_event()

    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__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_2));__Pyx_GIVEREF(__pyx_t_2);__pyx_t_2 = 0;

    +1047: _start_completed_event = _dummy_event()

    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_17_gevent_cgreenlet__dummy_event)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__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_2));__Pyx_GIVEREF(__pyx_t_2);__pyx_t_2 = 0;

     1048:

     1049:

     1050: # This is *only* called as a callback from the hub via Greenlet.kill(),

     1051: # and its first argument is the Greenlet. So we can be sure about the types.

    +1052: 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_kill", 0);/* 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*)(__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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_kill (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_glet,&__pyx_n_s_exception,&__pyx_n_s_waiter,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_glet,&__pyx_n_s_exception,&__pyx_n_s_waiter,0};#endifPyObject* values[3] = {0,0,0};if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);CYTHON_FALLTHROUGH;case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_glet)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L3_error)else goto __pyx_L5_argtuple_error;CYTHON_FALLTHROUGH;case  1:if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exception)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L3_error)else {__Pyx_RaiseArgtupleInvalid("_kill", 1, 3, 3, 1); __PYX_ERR(0, 1052, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  2:if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_waiter)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L3_error)else {__Pyx_RaiseArgtupleInvalid("_kill", 1, 3, 3, 2); __PYX_ERR(0, 1052, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_kill") < 0)) __PYX_ERR(0, 1052, __pyx_L3_error)}} else if (unlikely(__pyx_nargs != 3)) {goto __pyx_L5_argtuple_error;} else {values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);}__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_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("_kill", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1052, __pyx_L3_error)__pyx_L3_error:;__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_ptype_6gevent_17_gevent_cgreenlet_Greenlet, 1, "glet", 0))) __PYX_ERR(0, 1052, __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;__pyx_L0:;__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_RefNannyDeclarations__Pyx_RefNannySetupContext("_kill", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = __pyx_f_6gevent_17_gevent_cgreenlet__kill(__pyx_v_glet, __pyx_v_exception, __pyx_v_waiter, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __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_tuple__76 = PyTuple_Pack(3, __pyx_n_s_glet, __pyx_n_s_exception, __pyx_n_s_waiter); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1052, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__76);__Pyx_GIVEREF(__pyx_tuple__76);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_1_kill, 0, __pyx_n_s_kill_2, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem(__pyx_d, __pyx_n_s_kill_2, __pyx_t_2) < 0) __PYX_ERR(0, 1052, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_kill_2, 1052, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 1052, __pyx_L1_error)

    +1053:     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_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:;}

    +1054:         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, 1054, __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;}

    +1055:             glet.throw(*exception)

    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_glet), __pyx_n_s_throw); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1055, __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, 1055, __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, 1055, __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;

     1056:         else:

    +1057:             glet.throw(exception)

    /*else*/ {__pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_glet), __pyx_n_s_throw); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1057, __pyx_L3_error)__Pyx_GOTREF(__pyx_t_8);__pyx_t_7 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {__pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_7)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_7);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_exception};__pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1057, __pyx_L3_error)__Pyx_GOTREF(__pyx_t_9);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;}__pyx_L9:;

    +1058:     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, 1058, __pyx_L5_except_error)__Pyx_GOTREF(__pyx_t_9);__Pyx_GOTREF(__pyx_t_8);__Pyx_GOTREF(__pyx_t_7);

     1059:         # XXX do we need this here?

    +1060:         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, 1060, __pyx_L5_except_error)__Pyx_GOTREF(__pyx_t_11);__pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_handle_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1060, __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, 1060, __pyx_L5_except_error)__Pyx_GOTREF(__pyx_t_11);__Pyx_INCREF((PyObject *)__pyx_v_glet);__Pyx_GIVEREF((PyObject *)__pyx_v_glet);PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_glet));__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info);__pyx_t_14 = __pyx_v_6gevent_17_gevent_cgreenlet_sys_exc_info; __pyx_t_15 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {__pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);if (likely(__pyx_t_15)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);__Pyx_INCREF(__pyx_t_15);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_14, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_15, };__pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);__Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1060, __pyx_L5_except_error)__Pyx_GOTREF(__pyx_t_13);__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;}__pyx_t_14 = __Pyx_PySequence_Tuple(__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1060, __pyx_L5_except_error)__Pyx_GOTREF(__pyx_t_14);__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;__pyx_t_13 = PyNumber_Add(__pyx_t_11, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1060, __pyx_L5_except_error)__Pyx_GOTREF(__pyx_t_13);__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;__pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1060, __pyx_L5_except_error)__Pyx_GOTREF(__pyx_t_14);__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 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;}__pyx_L5_except_error:;

    +1061:     if waiter is not None:

    __pyx_t_4 = (__pyx_v_waiter != Py_None);if (__pyx_t_4) {}

    +1062:         waiter.switch(None)

    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_switch); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1062, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_8);__pyx_t_9 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_9)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_9);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_9, Py_None};__pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1062, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_7);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

     1063:

     1064:

    +1065: 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("joinall", 0);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_8);__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\n    Wait 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.\n    ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_3joinall = {"joinall", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("joinall (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_greenlets,&__pyx_n_s_timeout,&__pyx_n_s_raise_error,&__pyx_n_s_count,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_greenlets,&__pyx_n_s_timeout,&__pyx_n_s_raise_error,&__pyx_n_s_count,0};#endifPyObject* values[4] = {0,0,0,0};values[1] = ((PyObject *)Py_None);values[2] = ((PyObject *)Py_False);values[3] = ((PyObject *)Py_None);if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);CYTHON_FALLTHROUGH;case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);CYTHON_FALLTHROUGH;case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_greenlets)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1065, __pyx_L3_error)else goto __pyx_L5_argtuple_error;CYTHON_FALLTHROUGH;case  1:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);if (value) { values[1] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1065, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  2:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_raise_error);if (value) { values[2] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1065, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  3:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_count);if (value) { values[3] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1065, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "joinall") < 0)) __PYX_ERR(0, 1065, __pyx_L3_error)}} else {switch (__pyx_nargs) {case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);CYTHON_FALLTHROUGH;case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);CYTHON_FALLTHROUGH;case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);break;default: goto __pyx_L5_argtuple_error;}}__pyx_v_greenlets = values[0];__pyx_v_timeout = values[1];__pyx_v_raise_error = values[2];__pyx_v_count = values[3];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("joinall", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1065, __pyx_L3_error)__pyx_L3_error:;__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 */__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_RefNannyDeclarations__Pyx_RefNannySetupContext("joinall", 0);__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, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __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_tuple__78 = PyTuple_Pack(4, __pyx_n_s_greenlets, __pyx_n_s_timeout, __pyx_n_s_raise_error, __pyx_n_s_count); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 1065, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__78);__Pyx_GIVEREF(__pyx_tuple__78);__pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_joinall, 1065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 1065, __pyx_L1_error)__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_3joinall, 0, __pyx_n_s_joinall, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__80);if (PyDict_SetItem(__pyx_d, __pyx_n_s_joinall, __pyx_t_2) < 0) __PYX_ERR(0, 1065, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__pyx_tuple__80 = PyTuple_Pack(3, Py_None, Py_False, Py_None); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 1065, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__80);__Pyx_GIVEREF(__pyx_tuple__80);

     1066:     """

     1067:     Wait for the ``greenlets`` to finish.

     1068:

     1069:     :param greenlets: A sequence (supporting :func:`len`) of greenlets to wait for.

     1070:     :keyword float timeout: If given, the maximum number of seconds to wait.

     1071:     :return: A sequence of the greenlets that finished before the timeout (if any)

     1072:         expired.

     1073:     """

    +1074:     if not raise_error:

    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_raise_error); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1074, __pyx_L1_error)__pyx_t_2 = (!__pyx_t_1);if (__pyx_t_2) {}

    +1075:         return wait(greenlets, timeout=timeout, count=count)

    __Pyx_XDECREF(__pyx_r);__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1075, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_INCREF(__pyx_v_greenlets);__Pyx_GIVEREF(__pyx_v_greenlets);PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_greenlets);__pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1075, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_timeout, __pyx_v_timeout) < 0) __PYX_ERR(0, 1075, __pyx_L1_error)if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_count, __pyx_v_count) < 0) __PYX_ERR(0, 1075, __pyx_L1_error)__pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_6gevent_17_gevent_cgreenlet_wait, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1075, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;__pyx_r = __pyx_t_5;__pyx_t_5 = 0;goto __pyx_L0;

     1076:

    +1077:     done = []

    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1077, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__pyx_v_done = ((PyObject*)__pyx_t_5);__pyx_t_5 = 0;

    +1078:     for obj in iwait(greenlets, timeout=timeout, count=count):

    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1078, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_INCREF(__pyx_v_greenlets);__Pyx_GIVEREF(__pyx_v_greenlets);PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_greenlets);__pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_timeout, __pyx_v_timeout) < 0) __PYX_ERR(0, 1078, __pyx_L1_error)if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_count, __pyx_v_count) < 0) __PYX_ERR(0, 1078, __pyx_L1_error)__pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_6gevent_17_gevent_cgreenlet_iwait, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {__pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;__pyx_t_7 = NULL;} else {__pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1078, __pyx_L1_error)}__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;for (;;) {if (likely(!__pyx_t_7)) {if (likely(PyList_CheckExact(__pyx_t_4))) {if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS__pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1078, __pyx_L1_error)#else__pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);#endif} else {if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS__pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(0, 1078, __pyx_L1_error)#else__pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1078, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);#endif}} else {__pyx_t_3 = __pyx_t_7(__pyx_t_4);if (unlikely(!__pyx_t_3)) {PyObject* exc_type = PyErr_Occurred();if (exc_type) {if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();else __PYX_ERR(0, 1078, __pyx_L1_error)}break;}__Pyx_GOTREF(__pyx_t_3);}__Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_3);__pyx_t_3 = 0;}__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    +1079:         if getattr(obj, 'exception', None) is not None:

    __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_n_s_exception, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __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) {}

    +1080:             if hasattr(obj, '_raise_exception'):

    __pyx_t_2 = __Pyx_HasAttr(__pyx_v_obj, __pyx_n_s_raise_exception); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1080, __pyx_L1_error)if (likely(__pyx_t_2)) {goto __pyx_L7;}

    +1081:                 obj._raise_exception()

    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_raise_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1081, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__pyx_t_8 = NULL;__pyx_t_9 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);if (likely(__pyx_t_8)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);__Pyx_INCREF(__pyx_t_8);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_5, function);__pyx_t_9 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_8, };__pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;}__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

     1082:             else:

    +1083:                 raise obj.exception

    /*else*/ {__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __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, 1083, __pyx_L1_error)}__pyx_L7:;

    +1084:         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, 1084, __pyx_L1_error)

    +1085:     return done

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

     1086:

     1087:

    +1088: 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_killall3", 0);/* 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_10);__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;}

    +1089:     diehards = []

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

    +1090:     for g in greenlets:

    if (unlikely(__pyx_v_greenlets == Py_None)) {PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");__PYX_ERR(0, 1090, __pyx_L1_error)}__pyx_t_1 = __pyx_v_greenlets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;for (;;) {if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1090, __pyx_L1_error)#else__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1090, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);#endif__Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_3);__pyx_t_3 = 0;}__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1091:         if not g.dead:

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_dead); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1091, __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, 1091, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__pyx_t_5 = (!__pyx_t_4);if (__pyx_t_5) {}

    +1092:             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_10); __pyx_t_10 = 0;__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;__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:;}

    +1093:                 g.throw(exception)

    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_throw); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1093, __pyx_L6_error)__Pyx_GOTREF(__pyx_t_9);__pyx_t_10 = NULL;__pyx_t_11 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);if (likely(__pyx_t_10)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);__Pyx_INCREF(__pyx_t_10);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_9, function);__pyx_t_11 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_exception};__pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __pyx_L6_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;}__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +1094:             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_10) < 0) __PYX_ERR(0, 1094, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_GOTREF(__pyx_t_9);__Pyx_GOTREF(__pyx_t_10);

    +1095:                 get_my_hub(g).handle_error(g, *sys_exc_info())

    if (!(likely(((__pyx_v_g) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_g, __pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet))))) __PYX_ERR(0, 1095, __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, 1095, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_12);__pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_handle_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1095, __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, 1095, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_12);__Pyx_INCREF(__pyx_v_g);__Pyx_GIVEREF(__pyx_v_g);PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_g);__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_16 = NULL;__pyx_t_11 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {__pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);if (likely(__pyx_t_16)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);__Pyx_INCREF(__pyx_t_16);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_15, function);__pyx_t_11 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_16, };__pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);__Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1095, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_14);__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;}__pyx_t_15 = __Pyx_PySequence_Tuple(__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1095, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_15);__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;__pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1095, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_14);__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;__pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1095, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_15);__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;goto __pyx_L7_exception_handled;}__pyx_L8_except_error:;

    +1096:             if not g.dead:

    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_dead); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1096, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_10);__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1096, __pyx_L1_error)__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;__pyx_t_4 = (!__pyx_t_5);if (__pyx_t_4) {}

    +1097:                 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, 1097, __pyx_L1_error)

    +1098:     waiter.switch(diehards)

    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiter, __pyx_n_s_switch); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1098, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_10);__pyx_t_9 = NULL;__pyx_t_11 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);if (likely(__pyx_t_9)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);__Pyx_INCREF(__pyx_t_9);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_10, function);__pyx_t_11 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_diehards};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;}__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

     1099:

     1100:

    +1101: 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_killall", 0);/* 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_10);__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;}

    +1102:     for g in greenlets:

    if (unlikely(__pyx_v_greenlets == Py_None)) {PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");__PYX_ERR(0, 1102, __pyx_L1_error)}__pyx_t_1 = __pyx_v_greenlets; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;for (;;) {if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS__pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1102, __pyx_L1_error)#else__pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);#endif__Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_3);__pyx_t_3 = 0;}__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1103:         if not g.dead:

    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_dead); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1103, __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, 1103, __pyx_L1_error)__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__pyx_t_5 = (!__pyx_t_4);if (__pyx_t_5) {}

    +1104:             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_10); __pyx_t_10 = 0;__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;__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:;}

    +1105:                 g.throw(exception)

    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_throw); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1105, __pyx_L6_error)__Pyx_GOTREF(__pyx_t_9);__pyx_t_10 = NULL;__pyx_t_11 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {__pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);if (likely(__pyx_t_10)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);__Pyx_INCREF(__pyx_t_10);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_9, function);__pyx_t_11 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_exception};__pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1105, __pyx_L6_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;}__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +1106:             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_10) < 0) __PYX_ERR(0, 1106, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_3);__Pyx_GOTREF(__pyx_t_9);__Pyx_GOTREF(__pyx_t_10);

    +1107:                 get_my_hub(g).handle_error(g, *sys_exc_info())

    if (!(likely(((__pyx_v_g) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_g, __pyx_ptype_6gevent_17_gevent_cgreenlet_greenlet))))) __PYX_ERR(0, 1107, __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, 1107, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_12);__pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_handle_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1107, __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, 1107, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_12);__Pyx_INCREF(__pyx_v_g);__Pyx_GIVEREF(__pyx_v_g);PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_g);__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_16 = NULL;__pyx_t_11 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {__pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);if (likely(__pyx_t_16)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);__Pyx_INCREF(__pyx_t_16);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_15, function);__pyx_t_11 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_16, };__pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);__Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1107, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_14);__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;}__pyx_t_15 = __Pyx_PySequence_Tuple(__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1107, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_15);__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;__pyx_t_14 = PyNumber_Add(__pyx_t_12, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1107, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_14);__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;__pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1107, __pyx_L8_except_error)__Pyx_GOTREF(__pyx_t_15);__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;goto __pyx_L7_exception_handled;}__pyx_L8_except_error:;

     1108:

     1109:

    +1110: 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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_call_spawn_callbacks", 0);/* 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();}

    +1111:     if _spawn_callbacks is not None:

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

    +1112:         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, 1112, __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, 1112, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_6);__Pyx_XDECREF_SET(__pyx_v_cb, __pyx_t_6);__pyx_t_6 = 0;

    +1113:             cb(gr)

    __Pyx_INCREF(__pyx_v_cb);__pyx_t_8 = __pyx_v_cb; __pyx_t_9 = NULL;__pyx_t_7 = 0;if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_9)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_9);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_7 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_9, ((PyObject *)__pyx_v_gr)};__pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1113, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_6);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;}__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     1114:

     1115:

    +1116: _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);

     1117:

     1118:

    +1119: 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_RefNannyDeclarations__Pyx_RefNannySetupContext("__defaults__", 0);__Pyx_XDECREF(__pyx_r);__pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exception);__Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exception);PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_exception);__Pyx_INCREF(((PyObject *)Py_True));__Pyx_GIVEREF(((PyObject *)Py_True));PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)Py_True));__Pyx_INCREF(((PyObject *)Py_None));__Pyx_GIVEREF(((PyObject *)Py_None));PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)Py_None));__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_GIVEREF(__pyx_t_1);PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);__Pyx_INCREF(Py_None);__Pyx_GIVEREF(Py_None);PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);__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\n    Forceably 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.spa""wn_raw`.\n    ");static PyMethodDef __pyx_mdef_6gevent_17_gevent_cgreenlet_5killall = {"killall", (PyCFunction)(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_FASTCALLCYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);#endifCYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);PyObject *__pyx_r = 0;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("killall (wrapper)", 0);{#if CYTHON_USE_MODULE_STATEPyObject **__pyx_pyargnames[] = {&__pyx_n_s_greenlets,&__pyx_n_s_exception,&__pyx_n_s_block,&__pyx_n_s_timeout,0};#elsestatic PyObject **__pyx_pyargnames[] = {&__pyx_n_s_greenlets,&__pyx_n_s_exception,&__pyx_n_s_block,&__pyx_n_s_timeout,0};#endifPyObject* values[4] = {0,0,0,0};__pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);values[1] = __pyx_dynamic_args->__pyx_arg_exception;values[2] = ((PyObject *)((PyObject *)Py_True));values[3] = ((PyObject *)((PyObject *)Py_None));if (__pyx_kwds) {Py_ssize_t kw_args;switch (__pyx_nargs) {case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);CYTHON_FALLTHROUGH;case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);CYTHON_FALLTHROUGH;case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);CYTHON_FALLTHROUGH;case  0: break;default: goto __pyx_L5_argtuple_error;}kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);switch (__pyx_nargs) {case  0:if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_greenlets)) != 0)) kw_args--;else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L3_error)else goto __pyx_L5_argtuple_error;CYTHON_FALLTHROUGH;case  1:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exception);if (value) { values[1] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  2:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_block);if (value) { values[2] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L3_error)}CYTHON_FALLTHROUGH;case  3:if (kw_args > 0) {PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_timeout);if (value) { values[3] = value; kw_args--; }else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L3_error)}}if (unlikely(kw_args > 0)) {const Py_ssize_t kwd_pos_args = __pyx_nargs;if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "killall") < 0)) __PYX_ERR(0, 1119, __pyx_L3_error)}} else {switch (__pyx_nargs) {case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);CYTHON_FALLTHROUGH;case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);CYTHON_FALLTHROUGH;case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);CYTHON_FALLTHROUGH;case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);break;default: goto __pyx_L5_argtuple_error;}}__pyx_v_greenlets = values[0];__pyx_v_exception = values[1];__pyx_v_block = values[2];__pyx_v_timeout = values[3];}goto __pyx_L4_argument_unpacking_done;__pyx_L5_argtuple_error:;__Pyx_RaiseArgtupleInvalid("killall", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1119, __pyx_L3_error)__pyx_L3_error:;__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);int __pyx_lineno = 0;const char *__pyx_filename = NULL;int __pyx_clineno = 0;/* function exit code */__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;__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("killall", 0);/* 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_tuple__81 = PyTuple_Pack(11, __pyx_n_s_greenlets, __pyx_n_s_exception, __pyx_n_s_block, __pyx_n_s_timeout, __pyx_n_s_need_killed, __pyx_n_s_glet, __pyx_n_s_cancel, __pyx_n_s_loop, __pyx_n_s_waiter, __pyx_n_s_t, __pyx_n_s_alive); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1119, __pyx_L1_error)__Pyx_GOTREF(__pyx_tuple__81);__Pyx_GIVEREF(__pyx_tuple__81);__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6gevent_17_gevent_cgreenlet_5killall, 0, __pyx_n_s_killall, NULL, __pyx_n_s_gevent__gevent_cgreenlet, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (!__Pyx_CyFunction_InitDefaults(__pyx_t_2, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 1119, __pyx_L1_error)__Pyx_INCREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_2)->__pyx_arg_exception = __pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit;__Pyx_GIVEREF(__pyx_v_6gevent_17_gevent_cgreenlet_GreenletExit);__Pyx_CyFunction_SetDefaultsGetter(__pyx_t_2, __pyx_pf_6gevent_17_gevent_cgreenlet_12__defaults__);if (PyDict_SetItem(__pyx_d, __pyx_n_s_killall, __pyx_t_2) < 0) __PYX_ERR(0, 1119, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     1120:     """

     1121:     Forceably terminate all the *greenlets* by causing them to raise *exception*.

     1122:

     1123:     .. caution:: Use care when killing greenlets. If they are not prepared for exceptions,

     1124:        this could result in corrupted state.

     1125:

     1126:     :param greenlets: A **bounded** iterable of the non-None greenlets to terminate.

     1127:        *All* the items in this iterable must be greenlets that belong to the same hub,

     1128:        which should be the hub for this current thread. If this is a generator or iterator

     1129:        that switches greenlets, the results are undefined.

     1130:     :keyword exception: The type of exception to raise in the greenlets. By default this is

     1131:         :class:`GreenletExit`.

     1132:     :keyword bool block: If True (the default) then this function only returns when all the

     1133:         greenlets are dead; the current greenlet is unscheduled during that process.

     1134:         If greenlets ignore the initial exception raised in them,

     1135:         then they will be joined (with :func:`gevent.joinall`) and allowed to die naturally.

     1136:         If False, this function returns immediately and greenlets will raise

     1137:         the exception asynchronously.

     1138:     :keyword float timeout: A time in seconds to wait for greenlets to die. If given, it is

     1139:         only honored when ``block`` is True.

     1140:     :raise Timeout: If blocking and a timeout is given that elapses before

     1141:         all the greenlets are dead.

     1142:

     1143:     .. versionchanged:: 1.1a2

     1144:         *greenlets* can be any iterable of greenlets, like an iterator or a set.

     1145:         Previously it had to be a list or tuple.

     1146:     .. versionchanged:: 1.5a3

     1147:         Any :class:`Greenlet` in the *greenlets* list that hadn't been switched to before

     1148:         calling this method will never be switched to. This makes this function

     1149:         behave like :meth:`Greenlet.kill`. This does not apply to raw greenlets.

     1150:     .. versionchanged:: 1.5a3

     1151:         Now accepts raw greenlets created by :func:`gevent.spawn_raw`.

     1152:     """

     1153:

    +1154:     need_killed = []

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

    +1155:     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, 1155, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error)}for (;;) {if (likely(!__pyx_t_3)) {if (likely(PyList_CheckExact(__pyx_t_1))) {if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS__pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1155, __pyx_L1_error)#else__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);#endif} else {if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS__pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 1155, __pyx_L1_error)#else__pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);#endif}} else {__pyx_t_4 = __pyx_t_3(__pyx_t_1);if (unlikely(!__pyx_t_4)) {PyObject* exc_type = PyErr_Occurred();if (exc_type) {if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();else __PYX_ERR(0, 1155, __pyx_L1_error)}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;

     1156:         # Quick pass through to prevent any greenlet from

     1157:         # actually being switched to if it hasn't already.

     1158:         # (Previously we called ``list(greenlets)`` so we're still

     1159:         # linear.)

     1160:         #

     1161:         # We don't use glet.kill() here because we don't want to schedule

     1162:         # any callbacks in the loop; we're about to handle that more directly.

    +1163:         try:

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

    +1164:             cancel = glet._maybe_kill_before_start

    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_glet, __pyx_n_s_maybe_kill_before_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1164, __pyx_L5_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_XDECREF_SET(__pyx_v_cancel, __pyx_t_4);__pyx_t_4 = 0;

    +1165:         except AttributeError:

    __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);if (__pyx_t_10) {__Pyx_AddTraceback("gevent._gevent_cgreenlet.killall", __pyx_clineno, __pyx_lineno, __pyx_filename);if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 1165, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_GOTREF(__pyx_t_8);__Pyx_GOTREF(__pyx_t_9);

    +1166:             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, 1166, __pyx_L7_except_error)__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;goto __pyx_L6_exception_handled;}goto __pyx_L7_except_error;__pyx_L7_except_error:;

     1167:         else:

    +1168:             if not cancel(exception):

    /*else:*/ {__Pyx_INCREF(__pyx_v_cancel);__pyx_t_8 = __pyx_v_cancel; __pyx_t_9 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_9)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_9);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_exception};__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L7_except_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1168, __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;

    +1169:                 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, 1169, __pyx_L7_except_error)

     1170:

    +1171:     if not need_killed:

    __pyx_t_12 = (PyList_GET_SIZE(__pyx_v_need_killed) != 0);__pyx_t_11 = (!__pyx_t_12);if (__pyx_t_11) {}

    +1172:         return

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

     1173:

    +1174:     loop = glet.loop # pylint:disable=undefined-loop-variable

    if (unlikely(!__pyx_v_glet)) { __Pyx_RaiseUnboundLocalError("glet"); __PYX_ERR(0, 1174, __pyx_L1_error) }__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_glet, __pyx_n_s_loop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_v_loop = __pyx_t_1;__pyx_t_1 = 0;

    +1175:     if block:

    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_block); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1175, __pyx_L1_error)if (__pyx_t_11) {goto __pyx_L17;}

    +1176:         waiter = Waiter() # pylint:disable=undefined-variable

    __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6gevent_16_gevent_c_waiter_Waiter)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__pyx_v_waiter = ((struct __pyx_obj_6gevent_16_gevent_c_waiter_Waiter *)__pyx_t_1);__pyx_t_1 = 0;

    +1177:         loop.run_callback(_killall3, need_killed, exception, waiter)

    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_loop, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1177, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_9);__pyx_t_8 = __Pyx_CFunc_object__lParenlist__comma_object__comma_object__rParen_to_py_9greenlets_9exception_6waiter(__pyx_f_6gevent_17_gevent_cgreenlet__killall3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1177, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_8);__pyx_t_4 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);if (likely(__pyx_t_4)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);__Pyx_INCREF(__pyx_t_4);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_9, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_t_8, __pyx_v_need_killed, __pyx_v_exception, ((PyObject *)__pyx_v_waiter)};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 4+__pyx_t_10);__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, 1177, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;}__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    +1178:         t = Timeout._start_new_or_dummy(timeout)

    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_6gevent_17_gevent_cgreenlet_Timeout, __pyx_n_s_start_new_or_dummy); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1178, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_9);__pyx_t_8 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {__pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);if (likely(__pyx_t_8)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);__Pyx_INCREF(__pyx_t_8);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_9, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_timeout};__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_1);__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;}__pyx_v_t = __pyx_t_1;__pyx_t_1 = 0;

    +1179:         try:

    /*try:*/ {

    +1180:             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, 1180, __pyx_L19_error)__Pyx_GOTREF(__pyx_t_1);__pyx_v_alive = __pyx_t_1;__pyx_t_1 = 0;

    +1181:             if alive:

    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_alive); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1181, __pyx_L19_error)if (__pyx_t_11) {}}

    +1182:                 joinall(alive, raise_error=False)

    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_joinall); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L19_error)__Pyx_GOTREF(__pyx_t_1);__pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1182, __pyx_L19_error)__Pyx_GOTREF(__pyx_t_9);__Pyx_INCREF(__pyx_v_alive);__Pyx_GIVEREF(__pyx_v_alive);PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_alive);__pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1182, __pyx_L19_error)__Pyx_GOTREF(__pyx_t_8);if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_raise_error, Py_False) < 0) __PYX_ERR(0, 1182, __pyx_L19_error)__pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L19_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

     1183:         finally:

    +1184:             t.cancel()

    /*finally:*/ {/*normal exit:*/{__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_cancel); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1184, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_8);__pyx_t_9 = NULL;__pyx_t_10 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_9)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_9);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_10 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_9, };__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1184, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;goto __pyx_L20;}__pyx_L19_error:;/*exception exit:*/{__Pyx_PyThreadState_declare__Pyx_PyThreadState_assign__pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 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;if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);if ((PY_MAJOR_VERSION < 3) || 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_16);__Pyx_XGOTREF(__pyx_t_17);__Pyx_XGOTREF(__pyx_t_18);__pyx_t_10 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;{__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_cancel); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1184, __pyx_L23_error)__Pyx_GOTREF(__pyx_t_8);__pyx_t_9 = NULL;__pyx_t_19 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {__pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_9)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_9);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_19 = 1;}}{PyObject *__pyx_callargs[1] = {__pyx_t_9, };__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_19, 0+__pyx_t_19);__Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1184, __pyx_L23_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;}if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_16);__Pyx_XGIVEREF(__pyx_t_17);__Pyx_XGIVEREF(__pyx_t_18);__Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);}__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_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;__pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;goto __pyx_L1_error;__pyx_L23_error:;if (PY_MAJOR_VERSION >= 3) {__Pyx_XGIVEREF(__pyx_t_16);__Pyx_XGIVEREF(__pyx_t_17);__Pyx_XGIVEREF(__pyx_t_18);__Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18);}__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_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0;goto __pyx_L1_error;}__pyx_L20:;}

     1185:     else:

    +1186:         loop.run_callback(_killall, need_killed, exception)

    /*else*/ {__pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_loop, __pyx_n_s_run_callback); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1186, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_8);__pyx_t_9 = __Pyx_CFunc_object__lParenlist__comma_object__rParen_to_py_9greenlets_9exception(__pyx_f_6gevent_17_gevent_cgreenlet__killall); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1186, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_9);__pyx_t_1 = NULL;__pyx_t_14 = 0;if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {__pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);if (likely(__pyx_t_1)) {PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);__Pyx_INCREF(__pyx_t_1);__Pyx_INCREF(function);__Pyx_DECREF_SET(__pyx_t_8, function);__pyx_t_14 = 1;}}{PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_t_9, __pyx_v_need_killed, __pyx_v_exception};__pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_14, 3+__pyx_t_14);__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_4);__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;}__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;}__pyx_L17:;

     1187:

    +1188: def _init():

    static void __pyx_f_6gevent_17_gevent_cgreenlet__init(void) {__Pyx_RefNannyDeclarations__Pyx_RefNannySetupContext("_init", 0);/* function exit code */__Pyx_RefNannyFinishContext();}

    +1189:     greenlet_init() # pylint:disable=undefined-variable

    __pyx_f_6gevent_17_gevent_cgreenlet_greenlet_init();

     1190:

    +1191: _init()

    __pyx_f_6gevent_17_gevent_cgreenlet__init();

     1192:

    +1193: from gevent._util import import_c_accel

    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1193, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_INCREF(__pyx_n_s_import_c_accel);__Pyx_GIVEREF(__pyx_n_s_import_c_accel);PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_import_c_accel);__pyx_t_3 = __Pyx_Import(__pyx_n_s_gevent__util, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __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_n_s_import_c_accel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1193, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);if (PyDict_SetItem(__pyx_d, __pyx_n_s_import_c_accel, __pyx_t_2) < 0) __PYX_ERR(0, 1193, __pyx_L1_error)__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +1194: import_c_accel(globals(), 'gevent._greenlet')

    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_import_c_accel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_3);__pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1194, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_5);__Pyx_GIVEREF(__pyx_t_2);PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);__Pyx_INCREF(__pyx_kp_s_gevent__greenlet);__Pyx_GIVEREF(__pyx_kp_s_gevent__greenlet);PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_gevent__greenlet);__pyx_t_2 = 0;__pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1194, __pyx_L1_error)__Pyx_GOTREF(__pyx_t_2);__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;