Server IP : 85.214.239.14 / Your IP : 18.189.141.236 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/proc/2/root/proc/2/cwd/srv/modoboa/env/lib64/python3.5/site-packages/gevent/ |
Upload File : |
<!DOCTYPE html> <!-- Generated by Cython 0.29.2 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Cython: greenlet.py</title> <style type="text/css"> body.cython { font-family: courier; font-size: 12; } .cython.tag { } .cython.line { margin: 0em } .cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; } .cython.line .run { background-color: #B0FFB0; } .cython.line .mis { background-color: #FFB0B0; } .cython.code.run { border-left: 8px solid #B0FFB0; } .cython.code.mis { border-left: 8px solid #FFB0B0; } .cython.code .py_c_api { color: red; } .cython.code .py_macro_api { color: #FF7000; } .cython.code .pyx_c_api { color: #FF3000; } .cython.code .pyx_macro_api { color: #FF7000; } .cython.code .refnanny { color: #FFA000; } .cython.code .trace { color: #FFA000; } .cython.code .error_goto { color: #FFA000; } .cython.code .coerce { color: #008000; border: 1px dotted #008000 } .cython.code .py_attr { color: #FF0000; font-weight: bold; } .cython.code .c_attr { color: #0000FF; } .cython.code .py_call { color: #FF0000; font-weight: bold; } .cython.code .c_call { color: #0000FF; } .cython.score-0 {background-color: #FFFFff;} .cython.score-1 {background-color: #FFFFe7;} .cython.score-2 {background-color: #FFFFd4;} .cython.score-3 {background-color: #FFFFc4;} .cython.score-4 {background-color: #FFFFb6;} .cython.score-5 {background-color: #FFFFaa;} .cython.score-6 {background-color: #FFFF9f;} .cython.score-7 {background-color: #FFFF96;} .cython.score-8 {background-color: #FFFF8d;} .cython.score-9 {background-color: #FFFF86;} .cython.score-10 {background-color: #FFFF7f;} .cython.score-11 {background-color: #FFFF79;} .cython.score-12 {background-color: #FFFF73;} .cython.score-13 {background-color: #FFFF6e;} .cython.score-14 {background-color: #FFFF6a;} .cython.score-15 {background-color: #FFFF66;} .cython.score-16 {background-color: #FFFF62;} .cython.score-17 {background-color: #FFFF5e;} .cython.score-18 {background-color: #FFFF5b;} .cython.score-19 {background-color: #FFFF57;} .cython.score-20 {background-color: #FFFF55;} .cython.score-21 {background-color: #FFFF52;} .cython.score-22 {background-color: #FFFF4f;} .cython.score-23 {background-color: #FFFF4d;} .cython.score-24 {background-color: #FFFF4b;} .cython.score-25 {background-color: #FFFF48;} .cython.score-26 {background-color: #FFFF46;} .cython.score-27 {background-color: #FFFF44;} .cython.score-28 {background-color: #FFFF43;} .cython.score-29 {background-color: #FFFF41;} .cython.score-30 {background-color: #FFFF3f;} .cython.score-31 {background-color: #FFFF3e;} .cython.score-32 {background-color: #FFFF3c;} .cython.score-33 {background-color: #FFFF3b;} .cython.score-34 {background-color: #FFFF39;} .cython.score-35 {background-color: #FFFF38;} .cython.score-36 {background-color: #FFFF37;} .cython.score-37 {background-color: #FFFF36;} .cython.score-38 {background-color: #FFFF35;} .cython.score-39 {background-color: #FFFF34;} .cython.score-40 {background-color: #FFFF33;} .cython.score-41 {background-color: #FFFF32;} .cython.score-42 {background-color: #FFFF31;} .cython.score-43 {background-color: #FFFF30;} .cython.score-44 {background-color: #FFFF2f;} .cython.score-45 {background-color: #FFFF2e;} .cython.score-46 {background-color: #FFFF2d;} .cython.score-47 {background-color: #FFFF2c;} .cython.score-48 {background-color: #FFFF2b;} .cython.score-49 {background-color: #FFFF2b;} .cython.score-50 {background-color: #FFFF2a;} .cython.score-51 {background-color: #FFFF29;} .cython.score-52 {background-color: #FFFF29;} .cython.score-53 {background-color: #FFFF28;} .cython.score-54 {background-color: #FFFF27;} .cython.score-55 {background-color: #FFFF27;} .cython.score-56 {background-color: #FFFF26;} .cython.score-57 {background-color: #FFFF26;} .cython.score-58 {background-color: #FFFF25;} .cython.score-59 {background-color: #FFFF24;} .cython.score-60 {background-color: #FFFF24;} .cython.score-61 {background-color: #FFFF23;} .cython.score-62 {background-color: #FFFF23;} .cython.score-63 {background-color: #FFFF22;} .cython.score-64 {background-color: #FFFF22;} .cython.score-65 {background-color: #FFFF22;} .cython.score-66 {background-color: #FFFF21;} .cython.score-67 {background-color: #FFFF21;} .cython.score-68 {background-color: #FFFF20;} .cython.score-69 {background-color: #FFFF20;} .cython.score-70 {background-color: #FFFF1f;} .cython.score-71 {background-color: #FFFF1f;} .cython.score-72 {background-color: #FFFF1f;} .cython.score-73 {background-color: #FFFF1e;} .cython.score-74 {background-color: #FFFF1e;} .cython.score-75 {background-color: #FFFF1e;} .cython.score-76 {background-color: #FFFF1d;} .cython.score-77 {background-color: #FFFF1d;} .cython.score-78 {background-color: #FFFF1c;} .cython.score-79 {background-color: #FFFF1c;} .cython.score-80 {background-color: #FFFF1c;} .cython.score-81 {background-color: #FFFF1c;} .cython.score-82 {background-color: #FFFF1b;} .cython.score-83 {background-color: #FFFF1b;} .cython.score-84 {background-color: #FFFF1b;} .cython.score-85 {background-color: #FFFF1a;} .cython.score-86 {background-color: #FFFF1a;} .cython.score-87 {background-color: #FFFF1a;} .cython.score-88 {background-color: #FFFF1a;} .cython.score-89 {background-color: #FFFF19;} .cython.score-90 {background-color: #FFFF19;} .cython.score-91 {background-color: #FFFF19;} .cython.score-92 {background-color: #FFFF19;} .cython.score-93 {background-color: #FFFF18;} .cython.score-94 {background-color: #FFFF18;} .cython.score-95 {background-color: #FFFF18;} .cython.score-96 {background-color: #FFFF18;} .cython.score-97 {background-color: #FFFF17;} .cython.score-98 {background-color: #FFFF17;} .cython.score-99 {background-color: #FFFF17;} .cython.score-100 {background-color: #FFFF17;} .cython.score-101 {background-color: #FFFF16;} .cython.score-102 {background-color: #FFFF16;} .cython.score-103 {background-color: #FFFF16;} .cython.score-104 {background-color: #FFFF16;} .cython.score-105 {background-color: #FFFF16;} .cython.score-106 {background-color: #FFFF15;} .cython.score-107 {background-color: #FFFF15;} .cython.score-108 {background-color: #FFFF15;} .cython.score-109 {background-color: #FFFF15;} .cython.score-110 {background-color: #FFFF15;} .cython.score-111 {background-color: #FFFF15;} .cython.score-112 {background-color: #FFFF14;} .cython.score-113 {background-color: #FFFF14;} .cython.score-114 {background-color: #FFFF14;} .cython.score-115 {background-color: #FFFF14;} .cython.score-116 {background-color: #FFFF14;} .cython.score-117 {background-color: #FFFF14;} .cython.score-118 {background-color: #FFFF13;} .cython.score-119 {background-color: #FFFF13;} .cython.score-120 {background-color: #FFFF13;} .cython.score-121 {background-color: #FFFF13;} .cython.score-122 {background-color: #FFFF13;} .cython.score-123 {background-color: #FFFF13;} .cython.score-124 {background-color: #FFFF13;} .cython.score-125 {background-color: #FFFF12;} .cython.score-126 {background-color: #FFFF12;} .cython.score-127 {background-color: #FFFF12;} .cython.score-128 {background-color: #FFFF12;} .cython.score-129 {background-color: #FFFF12;} .cython.score-130 {background-color: #FFFF12;} .cython.score-131 {background-color: #FFFF12;} .cython.score-132 {background-color: #FFFF11;} .cython.score-133 {background-color: #FFFF11;} .cython.score-134 {background-color: #FFFF11;} .cython.score-135 {background-color: #FFFF11;} .cython.score-136 {background-color: #FFFF11;} .cython.score-137 {background-color: #FFFF11;} .cython.score-138 {background-color: #FFFF11;} .cython.score-139 {background-color: #FFFF11;} .cython.score-140 {background-color: #FFFF11;} .cython.score-141 {background-color: #FFFF10;} .cython.score-142 {background-color: #FFFF10;} .cython.score-143 {background-color: #FFFF10;} .cython.score-144 {background-color: #FFFF10;} .cython.score-145 {background-color: #FFFF10;} .cython.score-146 {background-color: #FFFF10;} .cython.score-147 {background-color: #FFFF10;} .cython.score-148 {background-color: #FFFF10;} .cython.score-149 {background-color: #FFFF10;} .cython.score-150 {background-color: #FFFF0f;} .cython.score-151 {background-color: #FFFF0f;} .cython.score-152 {background-color: #FFFF0f;} .cython.score-153 {background-color: #FFFF0f;} .cython.score-154 {background-color: #FFFF0f;} .cython.score-155 {background-color: #FFFF0f;} .cython.score-156 {background-color: #FFFF0f;} .cython.score-157 {background-color: #FFFF0f;} .cython.score-158 {background-color: #FFFF0f;} .cython.score-159 {background-color: #FFFF0f;} .cython.score-160 {background-color: #FFFF0f;} .cython.score-161 {background-color: #FFFF0e;} .cython.score-162 {background-color: #FFFF0e;} .cython.score-163 {background-color: #FFFF0e;} .cython.score-164 {background-color: #FFFF0e;} .cython.score-165 {background-color: #FFFF0e;} .cython.score-166 {background-color: #FFFF0e;} .cython.score-167 {background-color: #FFFF0e;} .cython.score-168 {background-color: #FFFF0e;} .cython.score-169 {background-color: #FFFF0e;} .cython.score-170 {background-color: #FFFF0e;} .cython.score-171 {background-color: #FFFF0e;} .cython.score-172 {background-color: #FFFF0e;} .cython.score-173 {background-color: #FFFF0d;} .cython.score-174 {background-color: #FFFF0d;} .cython.score-175 {background-color: #FFFF0d;} .cython.score-176 {background-color: #FFFF0d;} .cython.score-177 {background-color: #FFFF0d;} .cython.score-178 {background-color: #FFFF0d;} .cython.score-179 {background-color: #FFFF0d;} .cython.score-180 {background-color: #FFFF0d;} .cython.score-181 {background-color: #FFFF0d;} .cython.score-182 {background-color: #FFFF0d;} .cython.score-183 {background-color: #FFFF0d;} .cython.score-184 {background-color: #FFFF0d;} .cython.score-185 {background-color: #FFFF0d;} .cython.score-186 {background-color: #FFFF0d;} .cython.score-187 {background-color: #FFFF0c;} .cython.score-188 {background-color: #FFFF0c;} .cython.score-189 {background-color: #FFFF0c;} .cython.score-190 {background-color: #FFFF0c;} .cython.score-191 {background-color: #FFFF0c;} .cython.score-192 {background-color: #FFFF0c;} .cython.score-193 {background-color: #FFFF0c;} .cython.score-194 {background-color: #FFFF0c;} .cython.score-195 {background-color: #FFFF0c;} .cython.score-196 {background-color: #FFFF0c;} .cython.score-197 {background-color: #FFFF0c;} .cython.score-198 {background-color: #FFFF0c;} .cython.score-199 {background-color: #FFFF0c;} .cython.score-200 {background-color: #FFFF0c;} .cython.score-201 {background-color: #FFFF0c;} .cython.score-202 {background-color: #FFFF0c;} .cython.score-203 {background-color: #FFFF0b;} .cython.score-204 {background-color: #FFFF0b;} .cython.score-205 {background-color: #FFFF0b;} .cython.score-206 {background-color: #FFFF0b;} .cython.score-207 {background-color: #FFFF0b;} .cython.score-208 {background-color: #FFFF0b;} .cython.score-209 {background-color: #FFFF0b;} .cython.score-210 {background-color: #FFFF0b;} .cython.score-211 {background-color: #FFFF0b;} .cython.score-212 {background-color: #FFFF0b;} .cython.score-213 {background-color: #FFFF0b;} .cython.score-214 {background-color: #FFFF0b;} .cython.score-215 {background-color: #FFFF0b;} .cython.score-216 {background-color: #FFFF0b;} .cython.score-217 {background-color: #FFFF0b;} .cython.score-218 {background-color: #FFFF0b;} .cython.score-219 {background-color: #FFFF0b;} .cython.score-220 {background-color: #FFFF0b;} .cython.score-221 {background-color: #FFFF0b;} .cython.score-222 {background-color: #FFFF0a;} .cython.score-223 {background-color: #FFFF0a;} .cython.score-224 {background-color: #FFFF0a;} .cython.score-225 {background-color: #FFFF0a;} .cython.score-226 {background-color: #FFFF0a;} .cython.score-227 {background-color: #FFFF0a;} .cython.score-228 {background-color: #FFFF0a;} .cython.score-229 {background-color: #FFFF0a;} .cython.score-230 {background-color: #FFFF0a;} .cython.score-231 {background-color: #FFFF0a;} .cython.score-232 {background-color: #FFFF0a;} .cython.score-233 {background-color: #FFFF0a;} .cython.score-234 {background-color: #FFFF0a;} .cython.score-235 {background-color: #FFFF0a;} .cython.score-236 {background-color: #FFFF0a;} .cython.score-237 {background-color: #FFFF0a;} .cython.score-238 {background-color: #FFFF0a;} .cython.score-239 {background-color: #FFFF0a;} .cython.score-240 {background-color: #FFFF0a;} .cython.score-241 {background-color: #FFFF0a;} .cython.score-242 {background-color: #FFFF0a;} .cython.score-243 {background-color: #FFFF0a;} .cython.score-244 {background-color: #FFFF0a;} .cython.score-245 {background-color: #FFFF0a;} .cython.score-246 {background-color: #FFFF09;} .cython.score-247 {background-color: #FFFF09;} .cython.score-248 {background-color: #FFFF09;} .cython.score-249 {background-color: #FFFF09;} .cython.score-250 {background-color: #FFFF09;} .cython.score-251 {background-color: #FFFF09;} .cython.score-252 {background-color: #FFFF09;} .cython.score-253 {background-color: #FFFF09;} .cython.score-254 {background-color: #FFFF09;} </style> </head> <body class="cython"> <p><span style="border-bottom: solid 1px grey;">Generated by Cython 0.29.2</span></p> <p> <span style="background-color: #FFFF00">Yellow lines</span> hint at Python interaction.<br /> Click on a line that starts with a "<code>+</code>" to see the C code that Cython generated for it. </p> <p>Raw output: <a href="greenlet.c">greenlet.c</a></p> <div class="cython"><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0001</span>: # Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.</pre> <pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 1, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0002</span>: # cython: auto_pickle=False,embedsignature=True,always_allow_keywords=False</pre> <pre class="cython line score-0"> <span class="">0003</span>: </pre> <pre class="cython line score-0"> <span class="">0004</span>: from __future__ import absolute_import, print_function, division</pre> <pre class="cython line score-0"> <span class="">0005</span>: </pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0006</span>: from sys import _getframe as sys_getframe</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_getframe); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_getframe); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_getframe); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_sys, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_getframe);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_sys_getframe); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_sys_getframe, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0007</span>: from sys import exc_info as sys_exc_info</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_exc_info); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_exc_info); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_exc_info); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_sys, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_exc_info);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_sys_exc_info); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_sys_exc_info, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0008</span>: from weakref import ref as wref</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_ref); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_ref); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_ref); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_weakref, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_ref);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_wref); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_wref, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0009</span>: </pre> <pre class="cython line score-0"> <span class="">0010</span>: # XXX: How to get cython to let us rename this as RawGreenlet</pre> <pre class="cython line score-0"> <span class="">0011</span>: # like we prefer?</pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0012</span>: from greenlet import greenlet</pre> <pre class='cython code score-11 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_greenlet); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_greenlet); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_greenlet); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_greenlet, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0013</span>: from greenlet import GreenletExit</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_GreenletExit); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_GreenletExit); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_GreenletExit); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_greenlet, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_GreenletExit);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_GreenletExit); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_GreenletExit, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0014</span>: </pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0015</span>: from gevent._compat import reraise</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_reraise); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_reraise); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_reraise); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__compat, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_reraise);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_reraise); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_reraise, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0016</span>: from gevent._compat import PYPY as _PYPY</pre> <pre class='cython code score-21 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_PYPY_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_PYPY_2); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_PYPY_2); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__compat, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_PYPY_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 16, __pyx_L1_error)</span> __pyx_v_6gevent_9_greenlet__PYPY = __pyx_t_3; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0017</span>: from gevent._tblib import dump_traceback</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_dump_traceback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_dump_traceback); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_dump_traceback); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__tblib, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_dump_traceback);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_dump_traceback); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_dump_traceback, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0018</span>: from gevent._tblib import load_traceback</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_load_traceback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_load_traceback); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_load_traceback); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__tblib, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_load_traceback);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_load_traceback); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_load_traceback, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0019</span>: </pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0020</span>: from gevent.exceptions import InvalidSwitchError</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_InvalidSwitchError); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_InvalidSwitchError); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_InvalidSwitchError); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent_exceptions, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_InvalidSwitchError);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_InvalidSwitchError); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_InvalidSwitchError, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0021</span>: </pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0022</span>: from gevent._hub_primitives import iwait_on_objects as iwait</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_iwait_on_objects); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_iwait_on_objects); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_iwait_on_objects); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__hub_primitives, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_iwait_on_objects);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_iwait); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_iwait, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0023</span>: from gevent._hub_primitives import wait_on_objects as wait</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_wait_on_objects); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_wait_on_objects); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_wait_on_objects); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__hub_primitives, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_wait_on_objects);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_wait); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_wait, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0024</span>: </pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0025</span>: from gevent.timeout import Timeout</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Timeout); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Timeout); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_Timeout); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent_timeout, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Timeout);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_Timeout); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_Timeout, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0026</span>: </pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0027</span>: from gevent._config import config as GEVENT_CONFIG</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_config); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_config); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_config); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__config, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_config);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet_GEVENT_CONFIG); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet_GEVENT_CONFIG, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0028</span>: from gevent._util import Lazy</pre> <pre class='cython code score-19 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Lazy); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Lazy); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_Lazy); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__util, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Lazy);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Lazy, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 28, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0029</span>: from gevent._util import readproperty</pre> <pre class='cython code score-19 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_readproperty); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_readproperty); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_readproperty); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__util, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_readproperty);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_readproperty, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 29, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0030</span>: from gevent._hub_local import get_hub_noargs as get_hub</pre> <pre class='cython code score-19 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_get_hub_noargs); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_get_hub_noargs); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_get_hub_noargs); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__hub_local, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_get_hub_noargs);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_get_hub_noargs, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 30, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0031</span>: from gevent import _waiter</pre> <pre class='cython code score-19 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_waiter_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_waiter_2); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_waiter_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_waiter_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_waiter_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 31, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0032</span>: </pre> <pre class="cython line score-0"> <span class="">0033</span>: </pre> <pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0034</span>: __all__ = [</pre> <pre class='cython code score-17 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Greenlet); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Greenlet); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_Greenlet); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_joinall); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_joinall); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 1, __pyx_n_s_joinall); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_killall); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_killall); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 2, __pyx_n_s_killall); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 34, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0035</span>: 'Greenlet',</pre> <pre class="cython line score-0"> <span class="">0036</span>: 'joinall',</pre> <pre class="cython line score-0"> <span class="">0037</span>: 'killall',</pre> <pre class="cython line score-0"> <span class="">0038</span>: ]</pre> <pre class="cython line score-0"> <span class="">0039</span>: </pre> <pre class="cython line score-0"> <span class="">0040</span>: </pre> <pre class="cython line score-0"> <span class="">0041</span>: # In Cython, we define these as 'cdef inline' functions. The</pre> <pre class="cython line score-0"> <span class="">0042</span>: # compilation unit cannot have a direct assignment to them (import</pre> <pre class="cython line score-0"> <span class="">0043</span>: # is assignment) without generating a 'lvalue is not valid target'</pre> <pre class="cython line score-0"> <span class="">0044</span>: # error.</pre> <pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0045</span>: locals()['getcurrent'] = __import__('greenlet').getcurrent</pre> <pre class='cython code score-19 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin___import__, __pyx_tuple__21, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_getcurrent);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_getcurrent, __pyx_t_2) < 0)) <span class='error_goto'>__PYX_ERR(0, 45, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; /* … */ __pyx_tuple__21 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_greenlet);<span class='error_goto'> if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 45, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__21); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__21); </pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0046</span>: locals()['greenlet_init'] = lambda: None</pre> <pre class='cython code score-13 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_6lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_6gevent_9_greenlet_6lambda = {"lambda", (PyCFunction)__pyx_pw_6gevent_9_greenlet_6lambda, METH_NOARGS, 0}; static PyObject *__pyx_pw_6gevent_9_greenlet_6lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("lambda (wrapper)", 0); __pyx_r = __pyx_lambda_funcdef_6gevent_9_greenlet_lambda(__pyx_self); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_6gevent_9_greenlet_lambda(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("lambda", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_6lambda, 0, __pyx_n_s_lambda, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_greenlet_init, __pyx_t_2) < 0)) <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0047</span>: locals()['Waiter'] = _waiter.Waiter</pre> <pre class='cython code score-14 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_waiter_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_Waiter);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (unlikely(<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_Waiter, __pyx_t_1) < 0)) <span class='error_goto'>__PYX_ERR(0, 47, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0048</span>: </pre> <pre class="cython line score-0"> <span class="">0049</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0050</span>: if _PYPY:</pre> <pre class='cython code score-0 '> __pyx_t_3 = (__pyx_v_6gevent_9_greenlet__PYPY != 0); if (__pyx_t_3) { /* … */ } </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0051</span>: import _continuation # pylint:disable=import-error</pre> <pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_continuation, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_continuation, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 51, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0052</span>: _continulet = _continuation.continulet</pre> <pre class='cython code score-11 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_continuation);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_continulet);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_continulet_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 52, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0053</span>: </pre> <pre class="cython line score-0"> <span class="">0054</span>: </pre> <pre class="cython line score-0"> <span class="">0055</span>: class SpawnedLink(object):</pre> <pre class="cython line score-0"> <span class="">0056</span>: """</pre> <pre class="cython line score-0"> <span class="">0057</span>: A wrapper around link that calls it in another greenlet.</pre> <pre class="cython line score-0"> <span class="">0058</span>: </pre> <pre class="cython line score-0"> <span class="">0059</span>: Can be called only from main loop.</pre> <pre class="cython line score-0"> <span class="">0060</span>: """</pre> <pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0061</span>: __slots__ = ['callback']</pre> <pre class='cython code score-18 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_callback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_callback); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_callback); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_SpawnedLink->tp_dict, __pyx_n_s_slots, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 61, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_SpawnedLink); </pre><pre class="cython line score-0"> <span class="">0062</span>: </pre> <pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0063</span>: def __init__(self, callback):</pre> <pre class='cython code score-22 '>/* Python wrapper */ static int __pyx_pw_6gevent_9_greenlet_11SpawnedLink_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6gevent_9_greenlet_11SpawnedLink_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 63, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); } __pyx_v_callback = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 1, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 63, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_11SpawnedLink___init__(((struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *)__pyx_v_self), __pyx_v_callback); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_9_greenlet_11SpawnedLink___init__(struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *__pyx_v_self, PyObject *__pyx_v_callback) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0064</span>: if not callable(callback):</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCallable_Check</span>(__pyx_v_callback);<span class='error_goto'> if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 64, __pyx_L1_error)</span> __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { /* … */ } </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0065</span>: raise TypeError("Expected callable: %r" % (callback, ))</pre> <pre class='cython code score-16 '> __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_callback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_callback); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_v_callback); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Expected_callable_r, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_TypeError, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_3, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='error_goto'>__PYX_ERR(0, 65, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0066</span>: self.callback = callback</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_callback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_callback); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->callback); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->callback); __pyx_v_self->callback = __pyx_v_callback; </pre><pre class="cython line score-0"> <span class="">0067</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0068</span>: def __call__(self, source):</pre> <pre class='cython code score-25 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_source = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__call__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); } __pyx_v_source = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__call__", 1, 1, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 68, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_11SpawnedLink_2__call__(((struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *)__pyx_v_self), __pyx_v_source); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_11SpawnedLink_2__call__(struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *__pyx_v_self, PyObject *__pyx_v_source) { PyGreenlet *__pyx_v_g = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__call__", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_g); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0069</span>: g = greenlet(self.callback, get_hub())</pre> <pre class='cython code score-11 '> __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_11__hub_local_get_hub_noargs(0));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->callback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_self->callback); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_v_self->callback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_greenlet), __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_g = ((PyGreenlet *)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0070</span>: g.switch(source)</pre> <pre class='cython code score-17 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_g), __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_source) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_v_source); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 70, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0071</span>: </pre> <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0072</span>: def __hash__(self):</pre> <pre class='cython code score-8 '>/* Python wrapper */ static Py_hash_t __pyx_pw_6gevent_9_greenlet_11SpawnedLink_5__hash__(PyObject *__pyx_v_self); /*proto*/ static Py_hash_t __pyx_pw_6gevent_9_greenlet_11SpawnedLink_5__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_11SpawnedLink_4__hash__(((struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static Py_hash_t __pyx_pf_6gevent_9_greenlet_11SpawnedLink_4__hash__(struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *__pyx_v_self) { Py_hash_t __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__hash__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !<span class='py_c_api'>PyErr_Occurred</span>()) __pyx_r = -2; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0073</span>: return hash(self.callback)</pre> <pre class='cython code score-7 '> __pyx_t_1 = __pyx_v_self->callback; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyObject_Hash</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 73, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0074</span>: </pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0075</span>: def __eq__(self, other):</pre> <pre class='cython code score-4 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__eq__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_11SpawnedLink_6__eq__(((struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_11SpawnedLink_6__eq__(struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__eq__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0076</span>: return self.callback == getattr(other, 'callback', other)</pre> <pre class='cython code score-7 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_other, __pyx_n_s_callback, __pyx_v_other);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_v_self->callback, __pyx_t_1, Py_EQ); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0077</span>: </pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0078</span>: def __str__(self):</pre> <pre class='cython code score-3 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_9__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_9__str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_11SpawnedLink_8__str__(((struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_11SpawnedLink_8__str__(struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__str__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0079</span>: return str(self.callback)</pre> <pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(((PyObject *)(&PyString_Type)), __pyx_v_self->callback);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0080</span>: </pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0081</span>: def __repr__(self):</pre> <pre class='cython code score-4 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_11__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_11__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_11SpawnedLink_10__repr__(((struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_11SpawnedLink_10__repr__(struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0082</span>: return repr(self.callback)</pre> <pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_v_self->callback; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyObject_Repr</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0083</span>: </pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0084</span>: def __getattr__(self, item):</pre> <pre class='cython code score-4 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_11SpawnedLink_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__getattr__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_11SpawnedLink_12__getattr__(((struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_11SpawnedLink_12__getattr__(struct __pyx_obj_6gevent_9_greenlet_SpawnedLink *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__getattr__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SpawnedLink.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0085</span>: assert item != 'callback'</pre> <pre class='cython code score-7 '> #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { __pyx_t_1 = (<span class='pyx_c_api'>__Pyx_PyString_Equals</span>(__pyx_v_item, __pyx_n_s_callback, Py_NE)); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 85, __pyx_L1_error)</span> if (unlikely(!__pyx_t_1)) { <span class='py_c_api'>PyErr_SetNone</span>(PyExc_AssertionError); <span class='error_goto'>__PYX_ERR(0, 85, __pyx_L1_error)</span> } } #endif </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0086</span>: return getattr(self.callback, item)</pre> <pre class='cython code score-5 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = __pyx_v_self->callback; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetAttr</span>(__pyx_t_2, __pyx_v_item);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0087</span>: </pre> <pre class="cython line score-0"> <span class="">0088</span>: </pre> <pre class="cython line score-0"> <span class="">0089</span>: class SuccessSpawnedLink(SpawnedLink):</pre> <pre class="cython line score-0"> <span class="">0090</span>: """A wrapper around link that calls it in another greenlet only if source succeed.</pre> <pre class="cython line score-0"> <span class="">0091</span>: </pre> <pre class="cython line score-0"> <span class="">0092</span>: Can be called only from main loop.</pre> <pre class="cython line score-0"> <span class="">0093</span>: """</pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0094</span>: __slots__ = []</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_SuccessSpawnedLink->tp_dict, __pyx_n_s_slots, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 94, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_SuccessSpawnedLink); </pre><pre class="cython line score-0"> <span class="">0095</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0096</span>: def __call__(self, source):</pre> <pre class='cython code score-25 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_18SuccessSpawnedLink_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_18SuccessSpawnedLink_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_source = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__call__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); } __pyx_v_source = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__call__", 1, 1, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 96, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SuccessSpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_18SuccessSpawnedLink___call__(((struct __pyx_obj_6gevent_9_greenlet_SuccessSpawnedLink *)__pyx_v_self), __pyx_v_source); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_18SuccessSpawnedLink___call__(struct __pyx_obj_6gevent_9_greenlet_SuccessSpawnedLink *__pyx_v_self, PyObject *__pyx_v_source) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__call__", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.SuccessSpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0097</span>: if source.successful():</pre> <pre class='cython code score-21 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_source, __pyx_n_s_successful);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 97, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) <span class='error_goto'>__PYX_ERR(0, 97, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* … */ } </pre><pre class="cython line score-40" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0098</span>: return SpawnedLink.__call__(self, source)</pre> <pre class='cython code score-40 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_SpawnedLink), __pyx_n_s_call);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_source}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_source}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif { __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (__pyx_t_3) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_source); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_source); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1+__pyx_t_5, __pyx_v_source); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_6, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0099</span>: </pre> <pre class="cython line score-0"> <span class="">0100</span>: </pre> <pre class="cython line score-0"> <span class="">0101</span>: class FailureSpawnedLink(SpawnedLink):</pre> <pre class="cython line score-0"> <span class="">0102</span>: """A wrapper around link that calls it in another greenlet only if source failed.</pre> <pre class="cython line score-0"> <span class="">0103</span>: </pre> <pre class="cython line score-0"> <span class="">0104</span>: Can be called only from main loop.</pre> <pre class="cython line score-0"> <span class="">0105</span>: """</pre> <pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0106</span>: __slots__ = []</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_FailureSpawnedLink->tp_dict, __pyx_n_s_slots, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 106, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_FailureSpawnedLink); </pre><pre class="cython line score-0"> <span class="">0107</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0108</span>: def __call__(self, source):</pre> <pre class='cython code score-25 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_18FailureSpawnedLink_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_18FailureSpawnedLink_1__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_source = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__call__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) <span class='error_goto'>__PYX_ERR(0, 108, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); } __pyx_v_source = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__call__", 1, 1, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 108, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.FailureSpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_18FailureSpawnedLink___call__(((struct __pyx_obj_6gevent_9_greenlet_FailureSpawnedLink *)__pyx_v_self), __pyx_v_source); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_18FailureSpawnedLink___call__(struct __pyx_obj_6gevent_9_greenlet_FailureSpawnedLink *__pyx_v_self, PyObject *__pyx_v_source) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__call__", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.FailureSpawnedLink.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0109</span>: if not source.successful():</pre> <pre class='cython code score-21 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_source, __pyx_n_s_successful);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 109, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) <span class='error_goto'>__PYX_ERR(0, 109, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* … */ } </pre><pre class="cython line score-40" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0110</span>: return SpawnedLink.__call__(self, source)</pre> <pre class='cython code score-40 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_SpawnedLink), __pyx_n_s_call);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_source}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_source}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif { __pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 110, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); if (__pyx_t_3) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_source); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_source); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 1+__pyx_t_6, __pyx_v_source); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0111</span>: </pre> <pre class="cython line score-0"> <span class="">0112</span>: class _Frame(object):</pre> <pre class="cython line score-0"> <span class="">0113</span>: </pre> <pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0114</span>: __slots__ = ('f_code', 'f_lineno', 'f_back')</pre> <pre class='cython code score-15 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet__Frame->tp_dict, __pyx_n_s_slots, __pyx_tuple__22) < 0) <span class='error_goto'>__PYX_ERR(0, 114, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet__Frame); /* … */ __pyx_tuple__22 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_f_code, __pyx_n_s_f_lineno, __pyx_n_s_f_back);<span class='error_goto'> if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 114, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__22); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__22); </pre><pre class="cython line score-0"> <span class="">0115</span>: </pre> <pre class="cython line score-33" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0116</span>: def __init__(self, f_code, f_lineno, f_back):</pre> <pre class='cython code score-33 '>/* Python wrapper */ static int __pyx_pw_6gevent_9_greenlet_6_Frame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6gevent_9_greenlet_6_Frame_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_f_code = 0; PyObject *__pyx_v_f_lineno = 0; PyObject *__pyx_v_f_back = 0; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_f_code,&__pyx_n_s_f_lineno,&__pyx_n_s_f_back,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_f_code)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_f_lineno)) != 0)) kw_args--; else { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 3, 3, 1); <span class='error_goto'>__PYX_ERR(0, 116, __pyx_L3_error)</span> } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_f_back)) != 0)) kw_args--; else { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 3, 3, 2); <span class='error_goto'>__PYX_ERR(0, 116, __pyx_L3_error)</span> } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 116, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); } __pyx_v_f_code = values[0]; __pyx_v_f_lineno = values[1]; __pyx_v_f_back = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 3, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 116, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._Frame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_6_Frame___init__(((struct __pyx_obj_6gevent_9_greenlet__Frame *)__pyx_v_self), __pyx_v_f_code, __pyx_v_f_lineno, __pyx_v_f_back); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_9_greenlet_6_Frame___init__(struct __pyx_obj_6gevent_9_greenlet__Frame *__pyx_v_self, PyObject *__pyx_v_f_code, PyObject *__pyx_v_f_lineno, PyObject *__pyx_v_f_back) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._Frame.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0117</span>: self.f_code = f_code</pre> <pre class='cython code score-4 '> if (!(likely(((__pyx_v_f_code) == Py_None) || likely(<span class='pyx_c_api'>__Pyx_TypeTest</span>(__pyx_v_f_code, __pyx_ptype_6gevent_9_greenlet_CodeType))))) <span class='error_goto'>__PYX_ERR(0, 117, __pyx_L1_error)</span> __pyx_t_1 = __pyx_v_f_code; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->f_code); <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_v_self->f_code)); __pyx_v_self->f_code = ((PyCodeObject *)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0118</span>: self.f_lineno = f_lineno</pre> <pre class='cython code score-7 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyInt_As_int</span>(__pyx_v_f_lineno); if (unlikely((__pyx_t_2 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 118, __pyx_L1_error)</span> __pyx_v_self->f_lineno = __pyx_t_2; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0119</span>: self.f_back = f_back</pre> <pre class='cython code score-4 '> if (!(likely(((__pyx_v_f_back) == Py_None) || likely(<span class='pyx_c_api'>__Pyx_TypeTest</span>(__pyx_v_f_back, __pyx_ptype_6gevent_9_greenlet__Frame))))) <span class='error_goto'>__PYX_ERR(0, 119, __pyx_L1_error)</span> __pyx_t_1 = __pyx_v_f_back; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->f_back); <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_v_self->f_back)); __pyx_v_self->f_back = ((struct __pyx_obj_6gevent_9_greenlet__Frame *)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0120</span>: </pre> <pre class="cython line score-0"> <span class="">0121</span>: @property</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0122</span>: def f_globals(self):</pre> <pre class='cython code score-0 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_6_Frame_9f_globals_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_6_Frame_9f_globals_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_6_Frame_9f_globals___get__(((struct __pyx_obj_6gevent_9_greenlet__Frame *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_6_Frame_9f_globals___get__(CYTHON_UNUSED struct __pyx_obj_6gevent_9_greenlet__Frame *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0123</span>: return None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0124</span>: </pre> <pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0125</span>: def _Frame_from_list(frames):</pre> <pre class='cython code score-9 '>static struct __pyx_obj_6gevent_9_greenlet__Frame *__pyx_f_6gevent_9_greenlet__Frame_from_list(PyObject *__pyx_v_frames) { struct __pyx_obj_6gevent_9_greenlet__Frame *__pyx_v_previous = 0; struct __pyx_obj_6gevent_9_greenlet__Frame *__pyx_v_f = 0; PyObject *__pyx_v_frame = 0; struct __pyx_obj_6gevent_9_greenlet__Frame *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_Frame_from_list", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._Frame_from_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_previous); <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_f); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_frame); <span class='refnanny'>__Pyx_XGIVEREF</span>((PyObject *)__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0126</span>: previous = None</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); __pyx_v_previous = ((struct __pyx_obj_6gevent_9_greenlet__Frame *)Py_None); </pre><pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0127</span>: for frame in reversed(frames):</pre> <pre class='cython code score-23 '> if (unlikely(__pyx_v_frames == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable"); <span class='error_goto'>__PYX_ERR(0, 127, __pyx_L1_error)</span> } __pyx_t_1 = __pyx_v_frames; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_1) - 1; for (;;) { if (__pyx_t_2 < 0) break; if (__pyx_t_2 >= <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_t_1, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_2--; if (unlikely(0 < 0)) <span class='error_goto'>__PYX_ERR(0, 127, __pyx_L1_error)</span> #else __pyx_t_3 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_1, __pyx_t_2); __pyx_t_2--;<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); #endif if (!(likely(<span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_t_3))||((__pyx_t_3) == Py_None)||(<span class='py_c_api'>PyErr_Format</span>(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) <span class='error_goto'>__PYX_ERR(0, 127, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_frame, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* … */ } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-27" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0128</span>: f = _Frame(frame[0], frame[1], previous)</pre> <pre class='cython code score-27 '> if (unlikely(__pyx_v_frame == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 128, __pyx_L1_error)</span> } __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_frame, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (unlikely(__pyx_v_frame == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 128, __pyx_L1_error)</span> } __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_frame, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_t_3); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_previous)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_previous)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 2, ((PyObject *)__pyx_v_previous)); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet__Frame), __pyx_t_5, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_f, ((struct __pyx_obj_6gevent_9_greenlet__Frame *)__pyx_t_4)); __pyx_t_4 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0129</span>: previous = f</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_f)); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_previous, __pyx_v_f); </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0130</span>: return previous</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(((PyObject *)__pyx_r)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_previous)); __pyx_r = __pyx_v_previous; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0131</span>: </pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0132</span>: def _extract_stack(limit):</pre> <pre class='cython code score-7 '>static CYTHON_INLINE PyObject *__pyx_f_6gevent_9_greenlet__extract_stack(int __pyx_v_limit) { PyFrameObject *__pyx_v_frame = 0; PyObject *__pyx_v_frames = 0; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_extract_stack", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._extract_stack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_frame); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_frames); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0133</span>: try:</pre> <pre class='cython code score-10 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0134</span>: frame = sys_getframe()</pre> <pre class='cython code score-19 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_sys_getframe); __pyx_t_5 = __pyx_v_6gevent_9_greenlet_sys_getframe; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_t_6) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 134, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(((__pyx_t_4) == Py_None) || likely(<span class='pyx_c_api'>__Pyx_TypeTest</span>(__pyx_t_4, __pyx_ptype_6gevent_9_greenlet_FrameType))))) <span class='error_goto'>__PYX_ERR(0, 134, __pyx_L3_error)</span> __pyx_v_frame = ((PyFrameObject *)__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0135</span>: except ValueError:</pre> <pre class='cython code score-6 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_ValueError); if (__pyx_t_7) { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._extract_stack", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 135, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); </pre><pre class="cython line score-0"> <span class="">0136</span>: # In certain embedded cases that directly use the Python C api</pre> <pre class="cython line score-0"> <span class="">0137</span>: # to call Greenlet.spawn (e.g., uwsgi) this can raise</pre> <pre class="cython line score-0"> <span class="">0138</span>: # `ValueError: call stack is not deep enough`. This is because</pre> <pre class="cython line score-0"> <span class="">0139</span>: # the Cython stack frames for Greenlet.spawn -></pre> <pre class="cython line score-0"> <span class="">0140</span>: # Greenlet.__init__ -> _extract_stack are all on the C level,</pre> <pre class="cython line score-0"> <span class="">0141</span>: # not the Python level.</pre> <pre class="cython line score-0"> <span class="">0142</span>: # See https://github.com/gevent/gevent/issues/1212</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0143</span>: frame = None</pre> <pre class='cython code score-5 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_frame, ((PyFrameObject *)Py_None)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; </pre><pre class="cython line score-0"> <span class="">0144</span>: </pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0145</span>: frames = []</pre> <pre class='cython code score-5 '> __pyx_t_6 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_v_frames = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; </pre><pre class="cython line score-0"> <span class="">0146</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0147</span>: while limit and frame is not None:</pre> <pre class='cython code score-0 '> 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 = (((PyObject *)__pyx_v_frame) != Py_None); __pyx_t_10 = (__pyx_t_9 != 0); __pyx_t_8 = __pyx_t_10; __pyx_L13_bool_binop_done:; if (!__pyx_t_8) break; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0148</span>: limit -= 1</pre> <pre class='cython code score-0 '> __pyx_v_limit = (__pyx_v_limit - 1); </pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0149</span>: frames.append((frame.f_code, frame.f_lineno))</pre> <pre class='cython code score-13 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyInt_From_int</span>(__pyx_v_frame->f_lineno);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 149, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_frame->f_code)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_frame->f_code)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, ((PyObject *)__pyx_v_frame->f_code)); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_frames, __pyx_t_5);<span class='error_goto'> if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 149, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0150</span>: frame = frame.f_back</pre> <pre class='cython code score-5 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_frame), __pyx_n_s_f_back);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); if (!(likely(((__pyx_t_5) == Py_None) || likely(<span class='pyx_c_api'>__Pyx_TypeTest</span>(__pyx_t_5, __pyx_ptype_6gevent_9_greenlet_FrameType))))) <span class='error_goto'>__PYX_ERR(0, 150, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_frame, ((PyFrameObject *)__pyx_t_5)); __pyx_t_5 = 0; } </pre><pre class="cython line score-0"> <span class="">0151</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0152</span>: return frames</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_frames); __pyx_r = __pyx_v_frames; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0153</span>: </pre> <pre class="cython line score-0"> <span class="">0154</span>: </pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0155</span>: _greenlet__init__ = greenlet.__init__</pre> <pre class='cython code score-3 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_greenlet), __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet__greenlet__init__); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet__greenlet__init__, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0156</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0157</span>: class Greenlet(greenlet):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet { int (*has_links)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, int __pyx_skip_dispatch); PyObject *(*join)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_9_greenlet_8Greenlet_join *__pyx_optional_args); int (*ready)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, int __pyx_skip_dispatch); int (*successful)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, int __pyx_skip_dispatch); PyObject *(*rawlink)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, PyObject *, int __pyx_skip_dispatch); PyObject *(*_formatinfo)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, int __pyx_skip_dispatch); PyObject *(*_get_minimal_ident)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *); int (*__pyx___started_but_aborted)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *); int (*__pyx___start_cancelled_by_kill)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *); int (*__pyx___start_pending)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *); int (*__pyx___never_started_or_killed)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *); int (*__pyx___start_completed)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *); PyObject *(*__pyx___handle_death_before_start)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, PyObject *); PyObject *(*__pyx___cancel_start)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *); PyObject *(*_report_result)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, PyObject *); PyObject *(*_report_error)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, PyObject *); PyObject *(*_notify_links)(struct __pyx_obj_6gevent_9_greenlet_Greenlet *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *__pyx_vtabptr_6gevent_9_greenlet_Greenlet; </pre><pre class="cython line score-0"> <span class="">0158</span>: """</pre> <pre class="cython line score-0"> <span class="">0159</span>: A light-weight cooperatively-scheduled execution unit.</pre> <pre class="cython line score-0"> <span class="">0160</span>: """</pre> <pre class="cython line score-0"> <span class="">0161</span>: # pylint:disable=too-many-public-methods,too-many-instance-attributes</pre> <pre class="cython line score-0"> <span class="">0162</span>: </pre> <pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0163</span>: spawning_stack_limit = 10</pre> <pre class='cython code score-10 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_spawning_stack_limit, __pyx_int_10) < 0) <span class='error_goto'>__PYX_ERR(0, 163, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); </pre><pre class="cython line score-0"> <span class="">0164</span>: </pre> <pre class="cython line score-0"> <span class="">0165</span>: # pylint:disable=keyword-arg-before-vararg,super-init-not-called</pre> <pre class="cython line score-41" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0166</span>: def __init__(self, run=None, *args, **kwargs):</pre> <pre class='cython code score-41 '>/* Python wrapper */ static int __pyx_pw_6gevent_9_greenlet_8Greenlet_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_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 "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6gevent_9_greenlet_8Greenlet___init__; #endif static int __pyx_pw_6gevent_9_greenlet_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; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); __pyx_v_kwargs = <span class='py_c_api'>PyDict_New</span>(); if (unlikely(!__pyx_v_kwargs)) return -1; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_kwargs); if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) > 1) { __pyx_v_args = <span class='py_c_api'>PyTuple_GetSlice</span>(__pyx_args, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); if (unlikely(!__pyx_v_args)) { <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; } <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_run,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { default: case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_run); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 166, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { default: case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; } } __pyx_v_run = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_args); __pyx_v_args = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet___init__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), __pyx_v_run, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_args); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_kwargs); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_9_greenlet_8Greenlet___init__(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_run, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyGreenlet *__pyx_v_spawner = NULL; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_spawner); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">0167</span>: """</pre> <pre class="cython line score-0"> <span class="">0168</span>: :param args: The arguments passed to the ``run`` function.</pre> <pre class="cython line score-0"> <span class="">0169</span>: :param kwargs: The keyword arguments passed to the ``run`` function.</pre> <pre class="cython line score-0"> <span class="">0170</span>: :keyword callable run: The callable object to run. If not given, this object's</pre> <pre class="cython line score-0"> <span class="">0171</span>: `_run` method will be invoked (typically defined by subclasses).</pre> <pre class="cython line score-0"> <span class="">0172</span>: </pre> <pre class="cython line score-0"> <span class="">0173</span>: .. versionchanged:: 1.1b1</pre> <pre class="cython line score-0"> <span class="">0174</span>: The ``run`` argument to the constructor is now verified to be a callable</pre> <pre class="cython line score-0"> <span class="">0175</span>: object. Previously, passing a non-callable object would fail after the greenlet</pre> <pre class="cython line score-0"> <span class="">0176</span>: was spawned.</pre> <pre class="cython line score-0"> <span class="">0177</span>: </pre> <pre class="cython line score-0"> <span class="">0178</span>: .. versionchanged:: 1.3b1</pre> <pre class="cython line score-0"> <span class="">0179</span>: The ``GEVENT_TRACK_GREENLET_TREE`` configuration value may be set to</pre> <pre class="cython line score-0"> <span class="">0180</span>: a false value to disable ``spawn_tree_locals``, ``spawning_greenlet``,</pre> <pre class="cython line score-0"> <span class="">0181</span>: and ``spawning_stack``. The first two will be None in that case, and the</pre> <pre class="cython line score-0"> <span class="">0182</span>: latter will be empty.</pre> <pre class="cython line score-0"> <span class="">0183</span>: """</pre> <pre class="cython line score-0"> <span class="">0184</span>: # The attributes are documented in the .rst file</pre> <pre class="cython line score-0"> <span class="">0185</span>: </pre> <pre class="cython line score-0"> <span class="">0186</span>: # greenlet.greenlet(run=None, parent=None)</pre> <pre class="cython line score-0"> <span class="">0187</span>: # Calling it with both positional arguments instead of a keyword</pre> <pre class="cython line score-0"> <span class="">0188</span>: # argument (parent=get_hub()) speeds up creation of this object ~30%:</pre> <pre class="cython line score-0"> <span class="">0189</span>: # python -m timeit -s 'import gevent' 'gevent.Greenlet()'</pre> <pre class="cython line score-0"> <span class="">0190</span>: # Python 3.5: 2.70usec with keywords vs 1.94usec with positional</pre> <pre class="cython line score-0"> <span class="">0191</span>: # Python 3.4: 2.32usec with keywords vs 1.74usec with positional</pre> <pre class="cython line score-0"> <span class="">0192</span>: # Python 3.3: 2.55usec with keywords vs 1.92usec with positional</pre> <pre class="cython line score-0"> <span class="">0193</span>: # Python 2.7: 1.73usec with keywords vs 1.40usec with positional</pre> <pre class="cython line score-0"> <span class="">0194</span>: </pre> <pre class="cython line score-0"> <span class="">0195</span>: # Timings taken Feb 21 2018 prior to integration of #755</pre> <pre class="cython line score-0"> <span class="">0196</span>: # python -m perf timeit -s 'import gevent' 'gevent.Greenlet()'</pre> <pre class="cython line score-0"> <span class="">0197</span>: # 3.6.4 : Mean +- std dev: 1.08 us +- 0.05 us</pre> <pre class="cython line score-0"> <span class="">0198</span>: # 2.7.14 : Mean +- std dev: 1.44 us +- 0.06 us</pre> <pre class="cython line score-0"> <span class="">0199</span>: # PyPy2 5.10.0: Mean +- std dev: 2.14 ns +- 0.08 ns</pre> <pre class="cython line score-0"> <span class="">0200</span>: </pre> <pre class="cython line score-0"> <span class="">0201</span>: # After the integration of spawning_stack, spawning_greenlet,</pre> <pre class="cython line score-0"> <span class="">0202</span>: # and spawn_tree_locals on that same date:</pre> <pre class="cython line score-0"> <span class="">0203</span>: # 3.6.4 : Mean +- std dev: 8.92 us +- 0.36 us -> 8.2x</pre> <pre class="cython line score-0"> <span class="">0204</span>: # 2.7.14 : Mean +- std dev: 14.8 us +- 0.5 us -> 10.2x</pre> <pre class="cython line score-0"> <span class="">0205</span>: # PyPy2 5.10.0: Mean +- std dev: 3.24 us +- 0.17 us -> 1.5x</pre> <pre class="cython line score-0"> <span class="">0206</span>: </pre> <pre class="cython line score-0"> <span class="">0207</span>: # Compiling with Cython gets us to these numbers:</pre> <pre class="cython line score-0"> <span class="">0208</span>: # 3.6.4 : Mean +- std dev: 3.63 us +- 0.14 us</pre> <pre class="cython line score-0"> <span class="">0209</span>: # 2.7.14 : Mean +- std dev: 3.37 us +- 0.20 us</pre> <pre class="cython line score-0"> <span class="">0210</span>: # PyPy2 5.10.0 : Mean +- std dev: 4.44 us +- 0.28 us</pre> <pre class="cython line score-0"> <span class="">0211</span>: </pre> <pre class="cython line score-0"> <span class="">0212</span>: </pre> <pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0213</span>: _greenlet__init__(self, None, get_hub())</pre> <pre class='cython code score-42 '> __pyx_t_2 = ((PyObject *)__pyx_f_6gevent_11__hub_local_get_hub_noargs(0));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet__greenlet__init__); __pyx_t_3 = __pyx_v_6gevent_9_greenlet__greenlet__init__; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_self), Py_None, __pyx_t_2}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, ((PyObject *)__pyx_v_self), Py_None, __pyx_t_2}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 213, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (__pyx_t_4) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1+__pyx_t_5, Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_3, __pyx_t_6, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0214</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0215</span>: if run is not None:</pre> <pre class='cython code score-0 '> __pyx_t_7 = (__pyx_v_run != Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0216</span>: self._run = run</pre> <pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_run_2, __pyx_v_run) < 0) <span class='error_goto'>__PYX_ERR(0, 216, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0217</span>: </pre> <pre class="cython line score-0"> <span class="">0218</span>: # If they didn't pass a callable at all, then they must</pre> <pre class="cython line score-0"> <span class="">0219</span>: # already have one. Note that subclassing to override the run() method</pre> <pre class="cython line score-0"> <span class="">0220</span>: # itself has never been documented or supported.</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0221</span>: if not callable(self._run):</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_run_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyCallable_Check</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 221, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((!(__pyx_t_8 != 0)) != 0); if (unlikely(__pyx_t_7)) { /* … */ } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0222</span>: raise TypeError("The run argument or self._run must be callable")</pre> <pre class='cython code score-10 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_TypeError, __pyx_tuple_, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_1, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='error_goto'>__PYX_ERR(0, 222, __pyx_L1_error)</span> /* … */ __pyx_tuple_ = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_The_run_argument_or_self__run_mu);<span class='error_goto'> if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 222, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple_); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple_); </pre><pre class="cython line score-0"> <span class="">0223</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0224</span>: self.args = args</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_args); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_args); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->args); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->args); __pyx_v_self->args = __pyx_v_args; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0225</span>: self.kwargs = kwargs</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_kwargs); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_kwargs); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->kwargs); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->kwargs); __pyx_v_self->kwargs = __pyx_v_kwargs; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0226</span>: self.value = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->value); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->value); __pyx_v_self->value = Py_None; </pre><pre class="cython line score-0"> <span class="">0227</span>: </pre> <pre class="cython line score-0"> <span class="">0228</span>: #: An event, such as a timer or a callback that fires. It is established in</pre> <pre class="cython line score-0"> <span class="">0229</span>: #: start() and start_later() as those two objects, respectively.</pre> <pre class="cython line score-0"> <span class="">0230</span>: #: Once this becomes non-None, the Greenlet cannot be started again. Conversely,</pre> <pre class="cython line score-0"> <span class="">0231</span>: #: kill() and throw() check for non-None to determine if this object has ever been</pre> <pre class="cython line score-0"> <span class="">0232</span>: #: scheduled for starting. A placeholder _dummy_event is assigned by them to prevent</pre> <pre class="cython line score-0"> <span class="">0233</span>: #: the greenlet from being started in the future, if necessary.</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0234</span>: self._start_event = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_start_event); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_start_event); __pyx_v_self->_start_event = Py_None; </pre><pre class="cython line score-0"> <span class="">0235</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0236</span>: self._notifier = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_notifier); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_notifier); __pyx_v_self->_notifier = Py_None; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0237</span>: self._formatted_info = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_formatted_info); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_formatted_info); __pyx_v_self->_formatted_info = ((PyObject*)Py_None); </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0238</span>: self._links = []</pre> <pre class='cython code score-6 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_links); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_links); __pyx_v_self->_links = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0239</span>: self._ident = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_ident); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_ident); __pyx_v_self->_ident = Py_None; </pre><pre class="cython line score-0"> <span class="">0240</span>: </pre> <pre class="cython line score-0"> <span class="">0241</span>: # Initial state: None.</pre> <pre class="cython line score-0"> <span class="">0242</span>: # Completed successfully: (None, None, None)</pre> <pre class="cython line score-0"> <span class="">0243</span>: # Failed with exception: (t, v, dump_traceback(tb)))</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0244</span>: self._exc_info = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_exc_info); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_exc_info); __pyx_v_self->_exc_info = ((PyObject*)Py_None); </pre><pre class="cython line score-0"> <span class="">0245</span>: </pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0246</span>: if GEVENT_CONFIG.track_greenlet_tree:</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_6gevent_9_greenlet_GEVENT_CONFIG, __pyx_n_s_track_greenlet_tree);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) <span class='error_goto'>__PYX_ERR(0, 246, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* … */ goto __pyx_L5; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0247</span>: spawner = getcurrent() # pylint:disable=undefined-variable</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_9_greenlet_getcurrent());<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_spawner = ((PyGreenlet *)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0248</span>: self.spawning_greenlet = wref(spawner)</pre> <pre class='cython code score-16 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_wref); __pyx_t_3 = __pyx_v_6gevent_9_greenlet_wref; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, ((PyObject *)__pyx_v_spawner)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, ((PyObject *)__pyx_v_spawner)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 248, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->spawning_greenlet); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->spawning_greenlet); __pyx_v_self->spawning_greenlet = __pyx_t_1; __pyx_t_1 = 0; </pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0249</span>: try:</pre> <pre class='cython code score-12 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_try_end; __pyx_L6_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L7_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L11_try_end:; } </pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0250</span>: self.spawn_tree_locals = spawner.spawn_tree_locals</pre> <pre class='cython code score-13 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_spawner), __pyx_n_s_spawn_tree_locals);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!(likely(<span class='py_c_api'>PyDict_CheckExact</span>(__pyx_t_1))||((__pyx_t_1) == Py_None)||(<span class='py_c_api'>PyErr_Format</span>(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) <span class='error_goto'>__PYX_ERR(0, 250, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->spawn_tree_locals); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->spawn_tree_locals); __pyx_v_self->spawn_tree_locals = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0251</span>: except AttributeError:</pre> <pre class='cython code score-6 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_AttributeError); if (__pyx_t_5) { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_1, &__pyx_t_3, &__pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 251, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0252</span>: self.spawn_tree_locals = {}</pre> <pre class='cython code score-3 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->spawn_tree_locals); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->spawn_tree_locals); __pyx_v_self->spawn_tree_locals = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0253</span>: if spawner.parent is not None:</pre> <pre class='cython code score-6 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_spawner), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_7 = (__pyx_t_2 != Py_None); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; </pre><pre class="cython line score-0"> <span class="">0254</span>: # The main greenlet has no parent.</pre> <pre class="cython line score-0"> <span class="">0255</span>: # Its children get separate locals.</pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0256</span>: spawner.spawn_tree_locals = self.spawn_tree_locals</pre> <pre class='cython code score-4 '> __pyx_t_2 = __pyx_v_self->spawn_tree_locals; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); if (<span class='pyx_c_api'>__Pyx_PyObject_SetAttrStr</span>(((PyObject *)__pyx_v_spawner), __pyx_n_s_spawn_tree_locals, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 256, __pyx_L8_except_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0257</span>: </pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0258</span>: self._spawning_stack_frames = _extract_stack(self.spawning_stack_limit)</pre> <pre class='cython code score-11 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_spawning_stack_limit);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyInt_As_int</span>(__pyx_t_6); if (unlikely((__pyx_t_5 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 258, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_f_6gevent_9_greenlet__extract_stack(__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 258, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_spawning_stack_frames); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_spawning_stack_frames); __pyx_v_self->_spawning_stack_frames = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; </pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0259</span>: self._spawning_stack_frames.extend(getattr(spawner, '_spawning_stack_frames', []))</pre> <pre class='cython code score-14 '> if (unlikely(__pyx_v_self->_spawning_stack_frames == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); <span class='error_goto'>__PYX_ERR(0, 259, __pyx_L1_error)</span> } __pyx_t_6 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 259, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_spawner), __pyx_n_s_spawning_stack_frames, __pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = <span class='pyx_c_api'>__Pyx_PyList_Extend</span>(__pyx_v_self->_spawning_stack_frames, __pyx_t_3);<span class='error_goto'> if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 259, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">0260</span>: else:</pre> <pre class="cython line score-0"> <span class="">0261</span>: # None is the default for all of these in Cython, but we</pre> <pre class="cython line score-0"> <span class="">0262</span>: # need to declare them for pure-Python mode.</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0263</span>: self.spawning_greenlet = None</pre> <pre class='cython code score-2 '> /*else*/ { <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->spawning_greenlet); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->spawning_greenlet); __pyx_v_self->spawning_greenlet = Py_None; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0264</span>: self.spawn_tree_locals = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->spawn_tree_locals); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->spawn_tree_locals); __pyx_v_self->spawn_tree_locals = ((PyObject*)Py_None); </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0265</span>: self._spawning_stack_frames = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_spawning_stack_frames); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_spawning_stack_frames); __pyx_v_self->_spawning_stack_frames = ((PyObject*)Py_None); } __pyx_L5:; </pre><pre class="cython line score-0"> <span class="">0266</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0267</span>: @Lazy</pre> <pre class='cython code score-2 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_Lazy);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); </pre><pre class="cython line score-52" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0268</span>: def spawning_stack(self):</pre> <pre class='cython code score-52 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_3spawning_stack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_2spawning_stack[] = "Greenlet.spawning_stack(self)"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_3spawning_stack = {"spawning_stack", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_3spawning_stack, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_2spawning_stack}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_3spawning_stack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("spawning_stack (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_2spawning_stack(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_2spawning_stack(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("spawning_stack", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.spawning_stack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__23 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 268, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__23); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__23); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_3spawning_stack, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_spawning_stack, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__24));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_spawning_stack, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 268, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); /* … */ <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_4, (PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet, __pyx_n_s_spawning_stack);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_1, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 267, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_spawning_stack, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 268, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__24 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_spawning_stack, 268, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 268, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0269</span>: # Store this in the __dict__. We don't use it from the C</pre> <pre class="cython line score-0"> <span class="">0270</span>: # code. It's tempting to discard _spawning_stack_frames</pre> <pre class="cython line score-0"> <span class="">0271</span>: # after this, but child greenlets may still be created</pre> <pre class="cython line score-0"> <span class="">0272</span>: # that need it.</pre> <pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0273</span>: return _Frame_from_list(self._spawning_stack_frames or [])</pre> <pre class='cython code score-12 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->_spawning_stack_frames); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 273, __pyx_L1_error)</span> if (!__pyx_t_2) { } else { <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->_spawning_stack_frames); __pyx_t_1 = __pyx_v_self->_spawning_stack_frames; goto __pyx_L3_bool_binop_done; } __pyx_t_3 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_1 = __pyx_t_3; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_L3_bool_binop_done:; __pyx_t_3 = ((PyObject *)__pyx_f_6gevent_9_greenlet__Frame_from_list(((PyObject*)__pyx_t_1)));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0274</span>: </pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0275</span>: def _get_minimal_ident(self):</pre> <pre class='cython code score-5 '>static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet__get_minimal_ident(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { struct __pyx_obj_6gevent_7__ident_IdentRegistry *__pyx_v_reg = 0; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_get_minimal_ident", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._get_minimal_ident", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_reg); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0276</span>: reg = self.parent.ident_registry</pre> <pre class='cython code score-7 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_ident_registry);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(<span class='pyx_c_api'>__Pyx_TypeTest</span>(__pyx_t_2, __pyx_ptype_6gevent_7__ident_IdentRegistry))))) <span class='error_goto'>__PYX_ERR(0, 276, __pyx_L1_error)</span> __pyx_v_reg = ((struct __pyx_obj_6gevent_7__ident_IdentRegistry *)__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0277</span>: return reg.get_ident(self)</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_7__ident_IdentRegistry *)__pyx_v_reg->__pyx_vtab)->get_ident(__pyx_v_reg, ((PyObject *)__pyx_v_self), 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0278</span>: </pre> <pre class="cython line score-0"> <span class="">0279</span>: @property</pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0280</span>: def minimal_ident(self):</pre> <pre class='cython code score-3 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_13minimal_ident_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_13minimal_ident_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_13minimal_ident___get__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_13minimal_ident___get__(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.minimal_ident.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">0281</span>: """</pre> <pre class="cython line score-0"> <span class="">0282</span>: A small, unique integer that identifies this object.</pre> <pre class="cython line score-0"> <span class="">0283</span>: </pre> <pre class="cython line score-0"> <span class="">0284</span>: This is similar to :attr:`threading.Thread.ident` (and `id`)</pre> <pre class="cython line score-0"> <span class="">0285</span>: in that as long as this object is alive, no other greenlet *in</pre> <pre class="cython line score-0"> <span class="">0286</span>: this hub* will have the same id, but it makes a stronger</pre> <pre class="cython line score-0"> <span class="">0287</span>: guarantee that the assigned values will be small and</pre> <pre class="cython line score-0"> <span class="">0288</span>: sequential. Sometime after this object has died, the value</pre> <pre class="cython line score-0"> <span class="">0289</span>: will be available for reuse.</pre> <pre class="cython line score-0"> <span class="">0290</span>: </pre> <pre class="cython line score-0"> <span class="">0291</span>: To get ids that are unique across all hubs, combine this with</pre> <pre class="cython line score-0"> <span class="">0292</span>: the hub's ``minimal_ident``.</pre> <pre class="cython line score-0"> <span class="">0293</span>: </pre> <pre class="cython line score-0"> <span class="">0294</span>: .. versionadded:: 1.3a2</pre> <pre class="cython line score-0"> <span class="">0295</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0296</span>: if self._ident is None:</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_ident == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0297</span>: self._ident = self._get_minimal_ident()</pre> <pre class='cython code score-1 '> __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_get_minimal_ident(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_ident); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_ident); __pyx_v_self->_ident = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0298</span>: return self._ident</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->_ident); __pyx_r = __pyx_v_self->_ident; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0299</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0300</span>: @readproperty</pre> <pre class='cython code score-2 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_readproperty);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); </pre><pre class="cython line score-52" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0301</span>: def name(self):</pre> <pre class='cython code score-52 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_5name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_4name[] = "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_9_greenlet_8Greenlet_5name = {"name", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_5name, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_4name}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_5name(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("name (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_4name(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_4name(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("name", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__25 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 301, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__25); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__25); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_5name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_name, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__26));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_name_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 301, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); /* … */ <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_4, (PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet, __pyx_n_s_name_2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_1, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 300, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_name_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 301, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__26 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_name_2, 301, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 301, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0302</span>: """</pre> <pre class="cython line score-0"> <span class="">0303</span>: The greenlet name. By default, a unique name is constructed using</pre> <pre class="cython line score-0"> <span class="">0304</span>: the :attr:`minimal_ident`. You can assign a string to this</pre> <pre class="cython line score-0"> <span class="">0305</span>: value to change it. It is shown in the `repr` of this object if it</pre> <pre class="cython line score-0"> <span class="">0306</span>: has been assigned to or if the `minimal_ident` has already been generated.</pre> <pre class="cython line score-0"> <span class="">0307</span>: </pre> <pre class="cython line score-0"> <span class="">0308</span>: .. versionadded:: 1.3a2</pre> <pre class="cython line score-0"> <span class="">0309</span>: .. versionchanged:: 1.4</pre> <pre class="cython line score-0"> <span class="">0310</span>: Stop showing generated names in the `repr` when the ``minimal_ident``</pre> <pre class="cython line score-0"> <span class="">0311</span>: hasn't been requested. This reduces overhead and may be less confusing,</pre> <pre class="cython line score-0"> <span class="">0312</span>: since ``minimal_ident`` can get reused.</pre> <pre class="cython line score-0"> <span class="">0313</span>: """</pre> <pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0314</span>: return 'Greenlet-%d' % (self.minimal_ident,)</pre> <pre class='cython code score-12 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_minimal_ident);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Greenlet_d, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0315</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0316</span>: def _raise_exception(self):</pre> <pre class='cython code score-25 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_7_raise_exception(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_6_raise_exception[] = "Greenlet._raise_exception(self)"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_7_raise_exception = {"_raise_exception", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_7_raise_exception, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_6_raise_exception}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_7_raise_exception(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_raise_exception (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_6_raise_exception(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_6_raise_exception(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_raise_exception", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._raise_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__27 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 316, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__27); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__27); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_7_raise_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet__raise_exception, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__28));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_raise_exception, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 316, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__28 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_raise_exception, 316, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 316, __pyx_L1_error)</span> </pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0317</span>: reraise(*self.exc_info)</pre> <pre class='cython code score-9 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_exc_info);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_v_6gevent_9_greenlet_reraise, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0318</span>: </pre> <pre class="cython line score-0"> <span class="">0319</span>: @property</pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0320</span>: def loop(self):</pre> <pre class='cython code score-4 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_4loop_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_4loop_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_4loop___get__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_4loop___get__(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.loop.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">0321</span>: # needed by killall</pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0322</span>: return self.parent.loop</pre> <pre class='cython code score-6 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0323</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0324</span>: def __nonzero__(self):</pre> <pre class='cython code score-0 '>/* Python wrapper */ static int __pyx_pw_6gevent_9_greenlet_8Greenlet_9__nonzero__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6gevent_9_greenlet_8Greenlet_9__nonzero__(PyObject *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__nonzero__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_8__nonzero__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_9_greenlet_8Greenlet_8__nonzero__(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__nonzero__", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0325</span>: return self._start_event is not None and self._exc_info is None</pre> <pre class='cython code score-0 '> __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; </pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0326</span>: try:</pre> <pre class='cython code score-11 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L4_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L8_try_end:; } </pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0327</span>: __bool__ = __nonzero__ # Python 3</pre> <pre class='cython code score-13 '> <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet, __pyx_n_s_nonzero);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_bool, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 327, __pyx_L3_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0328</span>: except NameError: # pragma: no cover</pre> <pre class='cython code score-4 '> __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_NameError); if (__pyx_t_9) { <span class='pyx_c_api'>__Pyx_ErrRestore</span>(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; </pre><pre class="cython line score-0"> <span class="">0329</span>: # When we're compiled with Cython, the __nonzero__ function</pre> <pre class="cython line score-0"> <span class="">0330</span>: # goes directly into the slot and can't be accessed by name.</pre> <pre class="cython line score-0"> <span class="">0331</span>: pass</pre> <pre class="cython line score-0"> <span class="">0332</span>: </pre> <pre class="cython line score-0"> <span class="">0333</span>: ### Lifecycle</pre> <pre class="cython line score-0"> <span class="">0334</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0335</span>: if _PYPY:</pre> <pre class='cython code score-0 '> __pyx_t_3 = (__pyx_v_6gevent_9_greenlet__PYPY != 0); if (__pyx_t_3) { /* … */ goto __pyx_L9; } </pre><pre class="cython line score-0"> <span class="">0336</span>: # oops - pypy's .dead relies on __nonzero__ which we overriden above</pre> <pre class="cython line score-0"> <span class="">0337</span>: @property</pre> <pre class="cython line score-0"> <span class="">0338</span>: def dead(self):</pre> <pre class="cython line score-0"> <span class="">0339</span>: "Boolean indicating that the greenlet is dead and will not run again."</pre> <pre class="cython line score-0"> <span class="">0340</span>: if self._greenlet__main:</pre> <pre class="cython line score-0"> <span class="">0341</span>: return False</pre> <pre class="cython line score-0"> <span class="">0342</span>: if self.__start_cancelled_by_kill() or self.__started_but_aborted():</pre> <pre class="cython line score-0"> <span class="">0343</span>: return True</pre> <pre class="cython line score-0"> <span class="">0344</span>: </pre> <pre class="cython line score-0"> <span class="">0345</span>: return self._greenlet__started and not _continulet.is_pending(self)</pre> <pre class="cython line score-0"> <span class="">0346</span>: else:</pre> <pre class="cython line score-0"> <span class="">0347</span>: @property</pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0348</span>: def dead(self):</pre> <pre class='cython code score-6 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_4dead_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_4dead_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_4dead___get__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_4dead___get__(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.dead.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /*else*/ { } __pyx_L9:; </pre><pre class="cython line score-0"> <span class="">0349</span>: "Boolean indicating that the greenlet is dead and will not run again."</pre> <pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0350</span>: return self.__start_cancelled_by_kill() or self.__started_but_aborted() or greenlet.dead.__get__(self)</pre> <pre class='cython code score-26 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___start_cancelled_by_kill(__pyx_v_self); if (!__pyx_t_2) { } else { __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___started_but_aborted(__pyx_v_self); if (!__pyx_t_2) { } else { __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_greenlet), __pyx_n_s_dead);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 350, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_get);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_self)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 350, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_1 = __pyx_t_3; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0351</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0352</span>: def __never_started_or_killed(self):</pre> <pre class='cython code score-0 '>static int __pyx_f_6gevent_9_greenlet_8Greenlet___never_started_or_killed(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__never_started_or_killed", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0353</span>: return self._start_event is None</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_start_event == Py_None); __pyx_r = __pyx_t_1; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0354</span>: </pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0355</span>: def __start_pending(self):</pre> <pre class='cython code score-4 '>static int __pyx_f_6gevent_9_greenlet_8Greenlet___start_pending(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__start_pending", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("gevent._greenlet.Greenlet.__start_pending", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0356</span>: return (self._start_event is not None</pre> <pre class='cython code score-0 '> __pyx_t_2 = (__pyx_v_self->_start_event != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0357</span>: and (self._start_event.pending or getattr(self._start_event, 'active', False)))</pre> <pre class='cython code score-10 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->_start_event, __pyx_n_s_pending);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 357, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 357, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } __pyx_t_4 = __pyx_v_self->_start_event; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); __pyx_t_5 = __Pyx_GetAttr3(__pyx_t_4, __pyx_n_s_active, Py_False);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 357, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 357, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0358</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0359</span>: def __start_cancelled_by_kill(self):</pre> <pre class='cython code score-0 '>static int __pyx_f_6gevent_9_greenlet_8Greenlet___start_cancelled_by_kill(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__start_cancelled_by_kill", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0360</span>: return self._start_event is _cancelled_start_event</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_start_event == ((PyObject *)__pyx_v_6gevent_9_greenlet__cancelled_start_event)); __pyx_r = __pyx_t_1; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0361</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0362</span>: def __start_completed(self):</pre> <pre class='cython code score-0 '>static int __pyx_f_6gevent_9_greenlet_8Greenlet___start_completed(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__start_completed", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0363</span>: return self._start_event is _start_completed_event</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_start_event == ((PyObject *)__pyx_v_6gevent_9_greenlet__start_completed_event)); __pyx_r = __pyx_t_1; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0364</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0365</span>: def __started_but_aborted(self):</pre> <pre class='cython code score-0 '>static int __pyx_f_6gevent_9_greenlet_8Greenlet___started_but_aborted(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__started_but_aborted", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0366</span>: return (not self.__never_started_or_killed() # we have been started or killed</pre> <pre class='cython code score-0 '> __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___never_started_or_killed(__pyx_v_self) != 0)) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0367</span>: and not self.__start_cancelled_by_kill() # we weren't killed, so we must have been started</pre> <pre class='cython code score-0 '> __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___start_cancelled_by_kill(__pyx_v_self) != 0)) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0368</span>: and not self.__start_completed() # the start never completed</pre> <pre class='cython code score-0 '> __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___start_completed(__pyx_v_self) != 0)) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0369</span>: and not self.__start_pending()) # and we're not pending, so we must have been aborted</pre> <pre class='cython code score-0 '> __pyx_t_2 = ((!(((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___start_pending(__pyx_v_self) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0370</span>: </pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0371</span>: def __cancel_start(self):</pre> <pre class='cython code score-6 '>static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet___cancel_start(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__cancel_start", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.__cancel_start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0372</span>: if self._start_event is None:</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_start_event == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-0"> <span class="">0373</span>: # prevent self from ever being started in the future</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0374</span>: self._start_event = _cancelled_start_event</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_6gevent_9_greenlet__cancelled_start_event)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_6gevent_9_greenlet__cancelled_start_event)); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_start_event); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_start_event); __pyx_v_self->_start_event = ((PyObject *)__pyx_v_6gevent_9_greenlet__cancelled_start_event); </pre><pre class="cython line score-0"> <span class="">0375</span>: # cancel any pending start event</pre> <pre class="cython line score-0"> <span class="">0376</span>: # NOTE: If this was a real pending start event, this will leave a</pre> <pre class="cython line score-0"> <span class="">0377</span>: # "dangling" callback/timer object in the hub.loop.callbacks list;</pre> <pre class="cython line score-0"> <span class="">0378</span>: # depending on where we are in the event loop, it may even be in a local</pre> <pre class="cython line score-0"> <span class="">0379</span>: # variable copy of that list (in _run_callbacks). This isn't a problem,</pre> <pre class="cython line score-0"> <span class="">0380</span>: # except for the leak-tests.</pre> <pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0381</span>: self._start_event.stop()</pre> <pre class='cython code score-19 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->_start_event, __pyx_n_s_stop);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 381, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0382</span>: self._start_event.close()</pre> <pre class='cython code score-19 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->_start_event, __pyx_n_s_close);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 382, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 382, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">0383</span>: </pre> <pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0384</span>: def __handle_death_before_start(self, args):</pre> <pre class='cython code score-9 '>static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet___handle_death_before_start(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_v_arg = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__handle_death_before_start", 0); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_args); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.__handle_death_before_start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_arg); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_args); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">0385</span>: # args is (t, v, tb) or simply t or v</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0386</span>: if self._exc_info is None and self.dead:</pre> <pre class='cython code score-5 '> __pyx_t_2 = (__pyx_v_self->_exc_info == ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_dead);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 386, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 386, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-0"> <span class="">0387</span>: # the greenlet was never switched to before and it will never be, _report_error was not called</pre> <pre class="cython line score-0"> <span class="">0388</span>: # the result was not set and the links weren't notified. let's do it here.</pre> <pre class="cython line score-0"> <span class="">0389</span>: # checking that self.dead is true is essential, because throw() does not necessarily kill the greenlet</pre> <pre class="cython line score-0"> <span class="">0390</span>: # (if the exception raised by throw() is caught somewhere inside the greenlet).</pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0391</span>: if len(args) == 1:</pre> <pre class='cython code score-6 '> if (unlikely(__pyx_v_args == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "object of type 'NoneType' has no len()"); <span class='error_goto'>__PYX_ERR(0, 391, __pyx_L1_error)</span> } __pyx_t_5 = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_args);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 391, __pyx_L1_error)</span> __pyx_t_1 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_1) { /* … */ goto __pyx_L6; } </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0392</span>: arg = args[0]</pre> <pre class='cython code score-7 '> if (unlikely(__pyx_v_args == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 392, __pyx_L1_error)</span> } __pyx_t_4 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_v_arg = __pyx_t_4; __pyx_t_4 = 0; </pre><pre class="cython line score-0"> <span class="">0393</span>: #if isinstance(arg, type):</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0394</span>: if type(arg) is type(Exception):</pre> <pre class='cython code score-0 '> __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_arg)) == ((PyObject *)Py_TYPE(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))))); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* … */ goto __pyx_L7; } </pre><pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0395</span>: args = (arg, arg(), None)</pre> <pre class='cython code score-28 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_arg); __pyx_t_6 = __pyx_v_arg; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_6))) { __pyx_t_7 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_6, function); } } __pyx_t_4 = (__pyx_t_7) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_6, __pyx_t_7) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 395, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_arg); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_arg); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_v_arg); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2, Py_None); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_args, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; </pre><pre class="cython line score-0"> <span class="">0396</span>: else:</pre> <pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0397</span>: args = (type(arg), arg, None)</pre> <pre class='cython code score-12 '> /*else*/ { __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 397, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)Py_TYPE(__pyx_v_arg))); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)Py_TYPE(__pyx_v_arg))); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, ((PyObject *)Py_TYPE(__pyx_v_arg))); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_arg); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_arg); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1, __pyx_v_arg); <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2, Py_None); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_args, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; } __pyx_L7:; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0398</span>: elif not args:</pre> <pre class='cython code score-1 '> __pyx_t_3 = (__pyx_v_args != Py_None)&&(<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_args) != 0); __pyx_t_1 = ((!__pyx_t_3) != 0); if (__pyx_t_1) { /* … */ } __pyx_L6:; </pre><pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0399</span>: args = (GreenletExit, GreenletExit(), None)</pre> <pre class='cython code score-28 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_GreenletExit); __pyx_t_4 = __pyx_v_6gevent_9_greenlet_GreenletExit; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_7 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_6 = (__pyx_t_7) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_7) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 399, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_GreenletExit); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_6gevent_9_greenlet_GreenletExit); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_v_6gevent_9_greenlet_GreenletExit); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 1, __pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 2, Py_None); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_args, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0400</span>: self._report_error(args)</pre> <pre class='cython code score-1 '> __pyx_t_4 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_report_error(__pyx_v_self, __pyx_v_args);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-0"> <span class="">0401</span>: </pre> <pre class="cython line score-0"> <span class="">0402</span>: @property</pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0403</span>: def started(self):</pre> <pre class='cython code score-3 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_7started_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_7started_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_7started___get__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_7started___get__(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.started.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">0404</span>: # DEPRECATED</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0405</span>: return bool(self)</pre> <pre class='cython code score-5 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 405, __pyx_L1_error)</span> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>((!(!__pyx_t_1)));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0406</span>: </pre> <pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0407</span>: def ready(self):</pre> <pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_11ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static int __pyx_f_6gevent_9_greenlet_8Greenlet_ready(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_ready);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_9_greenlet_8Greenlet_11ready)) { <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 407, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 407, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("gevent._greenlet.Greenlet.ready", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_11ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_10ready[] = "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_9_greenlet_8Greenlet_11ready = {"ready", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_11ready, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_10ready}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_11ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("ready (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_10ready(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_10ready(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("ready", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>(__pyx_f_6gevent_9_greenlet_8Greenlet_ready(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.ready", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__29 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 407, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__29); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__29); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_11ready, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_ready, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__30));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_ready, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 407, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__30 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_ready, 407, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 407, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0408</span>: """</pre> <pre class="cython line score-0"> <span class="">0409</span>: Return a true value if and only if the greenlet has finished</pre> <pre class="cython line score-0"> <span class="">0410</span>: execution.</pre> <pre class="cython line score-0"> <span class="">0411</span>: </pre> <pre class="cython line score-0"> <span class="">0412</span>: .. versionchanged:: 1.1</pre> <pre class="cython line score-0"> <span class="">0413</span>: This function is only guaranteed to return true or false *values*, not</pre> <pre class="cython line score-0"> <span class="">0414</span>: necessarily the literal constants ``True`` or ``False``.</pre> <pre class="cython line score-0"> <span class="">0415</span>: """</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0416</span>: return self.dead or self._exc_info is not None</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_dead);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) <span class='error_goto'>__PYX_ERR(0, 416, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L3_bool_binop_done; } __pyx_t_6 = (__pyx_v_self->_exc_info != ((PyObject*)Py_None)); __pyx_t_7 = (__pyx_t_6 != 0); __pyx_t_5 = __pyx_t_7; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_5; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0417</span>: </pre> <pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0418</span>: def successful(self):</pre> <pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_13successful(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static int __pyx_f_6gevent_9_greenlet_8Greenlet_successful(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_successful);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_9_greenlet_8Greenlet_13successful)) { <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 418, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 418, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("gevent._greenlet.Greenlet.successful", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_13successful(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_12successful[] = "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_9_greenlet_8Greenlet_13successful = {"successful", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_13successful, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_12successful}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_13successful(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("successful (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_12successful(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_12successful(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("successful", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>(__pyx_f_6gevent_9_greenlet_8Greenlet_successful(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.successful", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__31 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 418, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__31); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__31); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_13successful, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_successful, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__32));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_successful, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 418, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__32 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_successful, 418, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 418, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0419</span>: """</pre> <pre class="cython line score-0"> <span class="">0420</span>: Return a true value if and only if the greenlet has finished execution</pre> <pre class="cython line score-0"> <span class="">0421</span>: successfully, that is, without raising an error.</pre> <pre class="cython line score-0"> <span class="">0422</span>: </pre> <pre class="cython line score-0"> <span class="">0423</span>: .. tip:: A greenlet that has been killed with the default</pre> <pre class="cython line score-0"> <span class="">0424</span>: :class:`GreenletExit` exception is considered successful.</pre> <pre class="cython line score-0"> <span class="">0425</span>: That is, ``GreenletExit`` is not considered an error.</pre> <pre class="cython line score-0"> <span class="">0426</span>: </pre> <pre class="cython line score-0"> <span class="">0427</span>: .. note:: This function is only guaranteed to return true or false *values*,</pre> <pre class="cython line score-0"> <span class="">0428</span>: not necessarily the literal constants ``True`` or ``False``.</pre> <pre class="cython line score-0"> <span class="">0429</span>: """</pre> <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0430</span>: return self._exc_info is not None and self._exc_info[1] is None</pre> <pre class='cython code score-8 '> __pyx_t_6 = (__pyx_v_self->_exc_info != ((PyObject*)Py_None)); __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { } else { __pyx_t_5 = __pyx_t_7; goto __pyx_L3_bool_binop_done; } if (unlikely(__pyx_v_self->_exc_info == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 430, __pyx_L1_error)</span> } __pyx_t_1 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_self->_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_7 = (__pyx_t_1 == Py_None); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_7 != 0); __pyx_t_5 = __pyx_t_6; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_5; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0431</span>: </pre> <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0432</span>: def __repr__(self):</pre> <pre class='cython code score-8 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_15__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_15__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_14__repr__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_14__repr__(struct __pyx_obj_6gevent_9_greenlet_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; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_classname); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_name); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_formatted); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0433</span>: classname = self.__class__.__name__</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_class);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_classname = __pyx_t_2; __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0434</span>: # If no name has been assigned, don't generate one, including a minimal_ident,</pre> <pre class="cython line score-0"> <span class="">0435</span>: # if not necessary. This reduces the use of weak references and associated</pre> <pre class="cython line score-0"> <span class="">0436</span>: # overhead.</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0437</span>: if 'name' not in self.__dict__ and self._ident is None:</pre> <pre class='cython code score-5 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_dict);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 437, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_4 = (<span class='pyx_c_api'>__Pyx_PySequence_ContainsTF</span>(__pyx_n_s_name_2, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) <span class='error_goto'>__PYX_ERR(0, 437, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->_ident == Py_None); __pyx_t_4 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { /* … */ goto __pyx_L3; } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0438</span>: name = ' '</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_s__2); __pyx_v_name = __pyx_kp_s__2; </pre><pre class="cython line score-0"> <span class="">0439</span>: else:</pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0440</span>: name = ' "%s" ' % (self.name,)</pre> <pre class='cython code score-11 '> /*else*/ { __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_name_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_s, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 440, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_name = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0441</span>: result = '<%s%sat %s' % (classname, name, hex(id(self)))</pre> <pre class='cython code score-18 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_id, ((PyObject *)__pyx_v_self));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_hex, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_classname); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_classname); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_v_classname); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_name); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_name); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 1, __pyx_v_name); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 2, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_s_sat_s, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0442</span>: formatted = self._formatinfo()</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_formatinfo(__pyx_v_self, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_formatted = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0443</span>: if formatted:</pre> <pre class='cython code score-2 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_formatted); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 443, __pyx_L1_error)</span> if (__pyx_t_3) { /* … */ } </pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0444</span>: result += ': ' + formatted</pre> <pre class='cython code score-12 '> __pyx_t_1 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_kp_s__3, __pyx_v_formatted);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyNumber_InPlaceAdd</span>(__pyx_v_result, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_result, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0445</span>: return result + '>'</pre> <pre class='cython code score-6 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_v_result, __pyx_kp_s__4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0446</span>: </pre> <pre class="cython line score-0"> <span class="">0447</span>: </pre> <pre class="cython line score-81" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0448</span>: def _formatinfo(self):</pre> <pre class='cython code score-81 '>static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_17_formatinfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet__formatinfo(struct __pyx_obj_6gevent_9_greenlet_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; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_formatinfo);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_9_greenlet_8Greenlet_17_formatinfo)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 448, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(<span class='py_c_api'>PyString_CheckExact</span>(__pyx_t_2))||((__pyx_t_2) == Py_None)||(<span class='py_c_api'>PyErr_Format</span>(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) <span class='error_goto'>__PYX_ERR(0, 448, __pyx_L1_error)</span> __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._formatinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_info); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_func); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_im_self); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_funcname); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_args); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_x); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_8genexpr1__pyx_v_key); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_8genexpr1__pyx_v_value); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_17_formatinfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_16_formatinfo[] = "Greenlet._formatinfo(self) -> str"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_17_formatinfo = {"_formatinfo", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_17_formatinfo, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_16_formatinfo}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_17_formatinfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_formatinfo (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_16_formatinfo(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_16_formatinfo(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_formatinfo", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_9_greenlet_8Greenlet__formatinfo(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._formatinfo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__33 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 448, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__33); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__33); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_17_formatinfo, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet__formatinfo, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__34));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_formatinfo, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 448, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__34 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_formatinfo, 448, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 448, __pyx_L1_error)</span> </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0449</span>: info = self._formatted_info</pre> <pre class='cython code score-1 '> __pyx_t_1 = __pyx_v_self->_formatted_info; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_v_info = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0450</span>: if info is not None:</pre> <pre class='cython code score-0 '> __pyx_t_5 = (__pyx_v_info != ((PyObject*)Py_None)); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0451</span>: return info</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_info); __pyx_r = __pyx_v_info; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0452</span>: </pre> <pre class="cython line score-0"> <span class="">0453</span>: # Are we running an arbitrary function provided to the constructor,</pre> <pre class="cython line score-0"> <span class="">0454</span>: # or did a subclass override _run?</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0455</span>: func = self._run</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_run_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_func = __pyx_t_1; __pyx_t_1 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0456</span>: im_self = getattr(func, '__self__', None)</pre> <pre class='cython code score-0 '> __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_func, __pyx_n_s_self, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_im_self = __pyx_t_1; __pyx_t_1 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0457</span>: if im_self is self:</pre> <pre class='cython code score-0 '> __pyx_t_6 = (__pyx_v_im_self == ((PyObject *)__pyx_v_self)); __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { /* … */ goto __pyx_L4; } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0458</span>: funcname = '_run'</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_run_2); __pyx_v_funcname = __pyx_n_s_run_2; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0459</span>: elif im_self is not None:</pre> <pre class='cython code score-0 '> __pyx_t_5 = (__pyx_v_im_self != Py_None); __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { /* … */ goto __pyx_L4; } </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0460</span>: funcname = repr(func)</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='py_c_api'>PyObject_Repr</span>(__pyx_v_func);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_funcname = __pyx_t_1; __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0461</span>: else:</pre> <pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0462</span>: funcname = getattr(func, '__name__', '') or repr(func)</pre> <pre class='cython code score-12 '> /*else*/ { __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_func, __pyx_n_s_name, __pyx_kp_s__5);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) <span class='error_goto'>__PYX_ERR(0, 462, __pyx_L1_error)</span> if (!__pyx_t_6) { <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else { <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_1 = __pyx_t_2; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = <span class='py_c_api'>PyObject_Repr</span>(__pyx_v_func);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_1 = __pyx_t_2; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_L5_bool_binop_done:; __pyx_v_funcname = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L4:; </pre><pre class="cython line score-0"> <span class="">0463</span>: </pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0464</span>: result = funcname</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_funcname); __pyx_v_result = __pyx_v_funcname; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0465</span>: args = []</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0466</span>: if self.args:</pre> <pre class='cython code score-1 '> __pyx_t_6 = (__pyx_v_self->args != Py_None)&&(<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_self->args) != 0); if (__pyx_t_6) { /* … */ } </pre><pre class="cython line score-39" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0467</span>: args = [repr(x)[:50] for x in self.args]</pre> <pre class='cython code score-39 '> { /* enter inner scope */ __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L10_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(__pyx_v_self->args == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable"); <span class='error_goto'>__PYX_ERR(0, 467, __pyx_L10_error)</span> } __pyx_t_2 = __pyx_v_self->args; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_t_2, __pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) <span class='error_goto'>__PYX_ERR(0, 467, __pyx_L10_error)</span> #else __pyx_t_3 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_2, __pyx_t_7); __pyx_t_7++;<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __pyx_L10_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); #endif <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_7genexpr__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='py_c_api'>PyObject_Repr</span>(__pyx_7genexpr__pyx_v_x);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __pyx_L10_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 467, __pyx_L10_error)</span> } __pyx_t_4 = <span class='py_c_api'>PySequence_GetSlice</span>(__pyx_t_3, 0, 50);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L10_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(<span class='pyx_c_api'>__Pyx_ListComp_Append</span>(__pyx_t_1, (PyObject*)__pyx_t_4))) <span class='error_goto'>__PYX_ERR(0, 467, __pyx_L10_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0; goto __pyx_L13_exit_scope; __pyx_L10_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0; goto __pyx_L1_error; __pyx_L13_exit_scope:; } /* exit inner scope */ <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_args, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0468</span>: if self.kwargs:</pre> <pre class='cython code score-2 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->kwargs); if (unlikely(__pyx_t_6 < 0)) <span class='error_goto'>__PYX_ERR(0, 468, __pyx_L1_error)</span> if (__pyx_t_6) { /* … */ } </pre><pre class="cython line score-51" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0469</span>: args.extend(['%s=%s' % (key, repr(value)[:50]) for (key, value) in self.kwargs.items()])</pre> <pre class='cython code score-51 '> { /* enter inner scope */ __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_7 = 0; if (unlikely(__pyx_v_self->kwargs == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); <span class='error_goto'>__PYX_ERR(0, 469, __pyx_L17_error)</span> } __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_self->kwargs, 1, __pyx_n_s_items, (&__pyx_t_8), (&__pyx_t_9));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_8, &__pyx_t_7, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) <span class='error_goto'>__PYX_ERR(0, 469, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_8genexpr1__pyx_v_key, __pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_8genexpr1__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='py_c_api'>PyObject_Repr</span>(__pyx_8genexpr1__pyx_v_value);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (unlikely(__pyx_t_3 == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 469, __pyx_L17_error)</span> } __pyx_t_4 = <span class='py_c_api'>PySequence_GetSlice</span>(__pyx_t_3, 0, 50);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_8genexpr1__pyx_v_key); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_8genexpr1__pyx_v_key); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_8genexpr1__pyx_v_key); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_s_s, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(<span class='pyx_c_api'>__Pyx_ListComp_Append</span>(__pyx_t_1, (PyObject*)__pyx_t_4))) <span class='error_goto'>__PYX_ERR(0, 469, __pyx_L17_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_8genexpr1__pyx_v_key); __pyx_8genexpr1__pyx_v_key = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_8genexpr1__pyx_v_value); __pyx_8genexpr1__pyx_v_value = 0; goto __pyx_L20_exit_scope; __pyx_L17_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_8genexpr1__pyx_v_key); __pyx_8genexpr1__pyx_v_key = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_8genexpr1__pyx_v_value); __pyx_8genexpr1__pyx_v_value = 0; goto __pyx_L1_error; __pyx_L20_exit_scope:; } /* exit inner scope */ __pyx_t_11 = <span class='pyx_c_api'>__Pyx_PyList_Extend</span>(__pyx_v_args, __pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 469, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0470</span>: if args:</pre> <pre class='cython code score-1 '> __pyx_t_6 = (<span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_args) != 0); if (__pyx_t_6) { /* … */ } </pre><pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0471</span>: result += '(' + ', '.join(args) + ')'</pre> <pre class='cython code score-21 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Join</span>(__pyx_kp_s__7, __pyx_v_args);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_kp_s__6, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_2, __pyx_kp_s__8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='py_c_api'>PyNumber_InPlaceAdd</span>(__pyx_v_result, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0472</span>: # it is important to save the result here, because once the greenlet exits '_run' attribute will be removed</pre> <pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0473</span>: self._formatted_info = result</pre> <pre class='cython code score-12 '> if (!(likely(<span class='py_c_api'>PyString_CheckExact</span>(__pyx_v_result))||((__pyx_v_result) == Py_None)||(<span class='py_c_api'>PyErr_Format</span>(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_result)->tp_name), 0))) <span class='error_goto'>__PYX_ERR(0, 473, __pyx_L1_error)</span> __pyx_t_2 = __pyx_v_result; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_formatted_info); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_formatted_info); __pyx_v_self->_formatted_info = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0474</span>: return result</pre> <pre class='cython code score-12 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); if (!(likely(<span class='py_c_api'>PyString_CheckExact</span>(__pyx_v_result))||((__pyx_v_result) == Py_None)||(<span class='py_c_api'>PyErr_Format</span>(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_result)->tp_name), 0))) <span class='error_goto'>__PYX_ERR(0, 474, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result); __pyx_r = ((PyObject*)__pyx_v_result); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0475</span>: </pre> <pre class="cython line score-0"> <span class="">0476</span>: @property</pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0477</span>: def exception(self):</pre> <pre class='cython code score-4 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_9exception_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_9exception_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_9exception___get__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_9exception___get__(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.exception.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">0478</span>: """</pre> <pre class="cython line score-0"> <span class="">0479</span>: Holds the exception instance raised by the function if the</pre> <pre class="cython line score-0"> <span class="">0480</span>: greenlet has finished with an error. Otherwise ``None``.</pre> <pre class="cython line score-0"> <span class="">0481</span>: """</pre> <pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0482</span>: return self._exc_info[1] if self._exc_info is not None else None</pre> <pre class='cython code score-9 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2 = (__pyx_v_self->_exc_info != ((PyObject*)Py_None)); if ((__pyx_t_2 != 0)) { if (unlikely(__pyx_v_self->_exc_info == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 482, __pyx_L1_error)</span> } __pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_self->_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); __pyx_t_1 = Py_None; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0483</span>: </pre> <pre class="cython line score-0"> <span class="">0484</span>: @property</pre> <pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0485</span>: def exc_info(self):</pre> <pre class='cython code score-10 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_8exc_info_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_8exc_info_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_8exc_info___get__(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_8exc_info___get__(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_v_ei = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get__", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.exc_info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_ei); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">0486</span>: """</pre> <pre class="cython line score-0"> <span class="">0487</span>: Holds the exc_info three-tuple raised by the function if the</pre> <pre class="cython line score-0"> <span class="">0488</span>: greenlet finished with an error. Otherwise a false value.</pre> <pre class="cython line score-0"> <span class="">0489</span>: </pre> <pre class="cython line score-0"> <span class="">0490</span>: .. note:: This is a provisional API and may change.</pre> <pre class="cython line score-0"> <span class="">0491</span>: </pre> <pre class="cython line score-0"> <span class="">0492</span>: .. versionadded:: 1.1</pre> <pre class="cython line score-0"> <span class="">0493</span>: """</pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0494</span>: ei = self._exc_info</pre> <pre class='cython code score-1 '> __pyx_t_1 = __pyx_v_self->_exc_info; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_v_ei = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0495</span>: if ei is not None and ei[0] is not None:</pre> <pre class='cython code score-8 '> __pyx_t_3 = (__pyx_v_ei != ((PyObject*)Py_None)); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } if (unlikely(__pyx_v_ei == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 495, __pyx_L1_error)</span> } __pyx_t_1 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_ei, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_4 = (__pyx_t_1 != Py_None); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0496</span>: return (ei[0], ei[1], load_traceback(ei[2]))</pre> <pre class='cython code score-46 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); if (unlikely(__pyx_v_ei == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 496, __pyx_L1_error)</span> } __pyx_t_1 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_ei, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(__pyx_v_ei == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 496, __pyx_L1_error)</span> } __pyx_t_5 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_ei, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 496, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); if (unlikely(__pyx_v_ei == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 496, __pyx_L1_error)</span> } __pyx_t_7 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_ei, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 496, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_load_traceback); __pyx_t_8 = __pyx_v_6gevent_9_greenlet_load_traceback; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_8))) { __pyx_t_9 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_8, function); } } __pyx_t_6 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_8, __pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 496, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 496, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 0, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 1, __pyx_t_5); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 2, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0497</span>: </pre> <pre class="cython line score-35" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0498</span>: def throw(self, *args):</pre> <pre class='cython code score-35 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_19throw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_18throw[] = "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_9_greenlet_8Greenlet_19throw = {"throw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_19throw, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_18throw}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_19throw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("throw (wrapper)", 0); if (unlikely(__pyx_kwds) && unlikely(<span class='py_c_api'>PyDict_Size</span>(__pyx_kwds) > 0) && unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "throw", 0))) return NULL; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_args); __pyx_v_args = __pyx_args; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_18throw(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), __pyx_v_args); /* function exit code */ <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_args); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_18throw(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("throw", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.throw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__35 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self_2, __pyx_n_s_args);<span class='error_goto'> if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 498, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__35); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__35); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_19throw, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_throw, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__36));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_throw, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 498, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__36 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_throw, 498, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 498, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0499</span>: """Immediately switch into the greenlet and raise an exception in it.</pre> <pre class="cython line score-0"> <span class="">0500</span>: </pre> <pre class="cython line score-0"> <span class="">0501</span>: Should only be called from the HUB, otherwise the current greenlet is left unscheduled forever.</pre> <pre class="cython line score-0"> <span class="">0502</span>: To raise an exception in a safe manner from any greenlet, use :meth:`kill`.</pre> <pre class="cython line score-0"> <span class="">0503</span>: </pre> <pre class="cython line score-0"> <span class="">0504</span>: If a greenlet was started but never switched to yet, then also</pre> <pre class="cython line score-0"> <span class="">0505</span>: a) cancel the event that will start it</pre> <pre class="cython line score-0"> <span class="">0506</span>: b) fire the notifications as if an exception was raised in a greenlet</pre> <pre class="cython line score-0"> <span class="">0507</span>: """</pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0508</span>: self.__cancel_start()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___cancel_start(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0509</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0510</span>: try:</pre> <pre class='cython code score-0 '> /*try:*/ { </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0511</span>: if not self.dead:</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_dead);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 511, __pyx_L4_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { /* … */ } } </pre><pre class="cython line score-0"> <span class="">0512</span>: # Prevent switching into a greenlet *at all* if we had never</pre> <pre class="cython line score-0"> <span class="">0513</span>: # started it. Usually this is the same thing that happens by throwing,</pre> <pre class="cython line score-0"> <span class="">0514</span>: # but if this is done from the hub with nothing else running, prevents a</pre> <pre class="cython line score-0"> <span class="">0515</span>: # LoopExit.</pre> <pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0516</span>: greenlet.throw(self, *args)</pre> <pre class='cython code score-20 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_greenlet), __pyx_n_s_throw);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)); __pyx_t_5 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_4, __pyx_v_args);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 516, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_5, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-0"> <span class="">0517</span>: finally:</pre> <pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0518</span>: self.__handle_death_before_start(args)</pre> <pre class='cython code score-20 '> /*finally:*/ { /*normal exit:*/{ __pyx_t_4 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___handle_death_before_start(__pyx_v_self, __pyx_v_args);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 518, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__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; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_9); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGOTREF</span>(__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_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___handle_death_before_start(__pyx_v_self, __pyx_v_args);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 518, __pyx_L8_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_12, __pyx_t_13, __pyx_t_14); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_9); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__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) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_12, __pyx_t_13, __pyx_t_14); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__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:; } </pre><pre class="cython line score-0"> <span class="">0519</span>: </pre> <pre class="cython line score-27" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0520</span>: def start(self):</pre> <pre class='cython code score-27 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_21start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_20start[] = "Greenlet.start(self)\nSchedule the greenlet to run in this loop iteration"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_21start = {"start", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_21start, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_20start}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_21start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("start (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_20start(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_20start(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("start", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__37 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 520, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__37); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__37); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_21start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_start, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__38));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_start, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 520, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__38 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_start, 520, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 520, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0521</span>: """Schedule the greenlet to run in this loop iteration"""</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0522</span>: if self._start_event is None:</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_start_event == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0523</span>: _call_spawn_callbacks(self)</pre> <pre class='cython code score-0 '> __pyx_f_6gevent_9_greenlet__call_spawn_callbacks(__pyx_v_self);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 523, __pyx_L1_error)</span> </pre><pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0524</span>: self._start_event = self.parent.loop.run_callback(self.switch)</pre> <pre class='cython code score-26 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_5, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 524, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 524, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_start_event); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_start_event); __pyx_v_self->_start_event = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">0525</span>: </pre> <pre class="cython line score-27" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0526</span>: def start_later(self, seconds):</pre> <pre class='cython code score-27 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_23start_later(PyObject *__pyx_v_self, PyObject *__pyx_v_seconds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_22start_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_9_greenlet_8Greenlet_23start_later = {"start_later", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_23start_later, METH_O, __pyx_doc_6gevent_9_greenlet_8Greenlet_22start_later}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_23start_later(PyObject *__pyx_v_self, PyObject *__pyx_v_seconds) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("start_later (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_22start_later(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), ((PyObject *)__pyx_v_seconds)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_22start_later(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_seconds) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("start_later", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.start_later", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__39 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self_2, __pyx_n_s_seconds);<span class='error_goto'> if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 526, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__39); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__39); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_23start_later, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_start_later, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__40));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_start_later, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 526, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__40 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_start_later, 526, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 526, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0527</span>: """</pre> <pre class="cython line score-0"> <span class="">0528</span>: start_later(seconds) -> None</pre> <pre class="cython line score-0"> <span class="">0529</span>: </pre> <pre class="cython line score-0"> <span class="">0530</span>: Schedule the greenlet to run in the future loop iteration</pre> <pre class="cython line score-0"> <span class="">0531</span>: *seconds* later</pre> <pre class="cython line score-0"> <span class="">0532</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0533</span>: if self._start_event is None:</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_self->_start_event == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0534</span>: _call_spawn_callbacks(self)</pre> <pre class='cython code score-0 '> __pyx_f_6gevent_9_greenlet__call_spawn_callbacks(__pyx_v_self);<span class='error_goto'> if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L1_error)</span> </pre><pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0535</span>: self._start_event = self.parent.loop.timer(seconds)</pre> <pre class='cython code score-23 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_5, __pyx_n_s_timer);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_seconds) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_v_seconds); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 535, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_start_event); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_start_event); __pyx_v_self->_start_event = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0536</span>: self._start_event.start(self.switch)</pre> <pre class='cython code score-20 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->_start_event, __pyx_n_s_start);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 536, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 536, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 536, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">0537</span>: </pre> <pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0538</span>: @staticmethod</pre> <pre class='cython code score-14 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_staticmethod, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_add_spawn_callback, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 539, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); </pre><pre class="cython line score-44" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0539</span>: def add_spawn_callback(callback):</pre> <pre class='cython code score-44 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_25add_spawn_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_24add_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_9_greenlet_8Greenlet_25add_spawn_callback = {"add_spawn_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_25add_spawn_callback, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_24add_spawn_callback}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_25add_spawn_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("add_spawn_callback (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_spawn_callback") < 0)) <span class='error_goto'>__PYX_ERR(0, 539, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); } __pyx_v_callback = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("add_spawn_callback", 1, 1, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 539, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.add_spawn_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_24add_spawn_callback(__pyx_v_callback); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_24add_spawn_callback(PyObject *__pyx_v_callback) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("add_spawn_callback", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.add_spawn_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__41 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_callback);<span class='error_goto'> if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 539, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__41); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__41); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_25add_spawn_callback, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_add_spawn_callback, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__42));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_add_spawn_callback, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 539, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); /* … */ <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet, __pyx_n_s_add_spawn_callback);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_codeobj__42 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __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_add_spawn_callback, 539, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 539, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0540</span>: """</pre> <pre class="cython line score-0"> <span class="">0541</span>: add_spawn_callback(callback) -> None</pre> <pre class="cython line score-0"> <span class="">0542</span>: </pre> <pre class="cython line score-0"> <span class="">0543</span>: Set up a *callback* to be invoked when :class:`Greenlet` objects</pre> <pre class="cython line score-0"> <span class="">0544</span>: are started.</pre> <pre class="cython line score-0"> <span class="">0545</span>: </pre> <pre class="cython line score-0"> <span class="">0546</span>: The invocation order of spawn callbacks is unspecified. Adding the</pre> <pre class="cython line score-0"> <span class="">0547</span>: same callback more than one time will not cause it to be called more</pre> <pre class="cython line score-0"> <span class="">0548</span>: than once.</pre> <pre class="cython line score-0"> <span class="">0549</span>: </pre> <pre class="cython line score-0"> <span class="">0550</span>: .. versionadded:: 1.4.0</pre> <pre class="cython line score-0"> <span class="">0551</span>: """</pre> <pre class="cython line score-0"> <span class="">0552</span>: global _spawn_callbacks</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0553</span>: if _spawn_callbacks is None: # pylint:disable=used-before-assignment</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_6gevent_9_greenlet__spawn_callbacks == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0554</span>: _spawn_callbacks = set()</pre> <pre class='cython code score-6 '> __pyx_t_3 = <span class='py_c_api'>PySet_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks, ((PyObject*)__pyx_t_3)); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0555</span>: _spawn_callbacks.add(callback)</pre> <pre class='cython code score-10 '> if (unlikely(__pyx_v_6gevent_9_greenlet__spawn_callbacks == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); <span class='error_goto'>__PYX_ERR(0, 555, __pyx_L1_error)</span> } __pyx_t_4 = <span class='py_c_api'>PySet_Add</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks, __pyx_v_callback);<span class='error_goto'> if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 555, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0556</span>: </pre> <pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0557</span>: @staticmethod</pre> <pre class='cython code score-14 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_staticmethod, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_remove_spawn_callback, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 558, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); </pre><pre class="cython line score-43" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0558</span>: def remove_spawn_callback(callback):</pre> <pre class='cython code score-43 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_27remove_spawn_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_26remove_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_9_greenlet_8Greenlet_27remove_spawn_callback = {"remove_spawn_callback", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_27remove_spawn_callback, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_26remove_spawn_callback}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_27remove_spawn_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("remove_spawn_callback (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "remove_spawn_callback") < 0)) <span class='error_goto'>__PYX_ERR(0, 558, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); } __pyx_v_callback = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("remove_spawn_callback", 1, 1, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 558, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.remove_spawn_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_26remove_spawn_callback(__pyx_v_callback); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_26remove_spawn_callback(PyObject *__pyx_v_callback) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("remove_spawn_callback", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.remove_spawn_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__43 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_callback);<span class='error_goto'> if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 558, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__43); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__43); /* … */ __pyx_t_1 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_27remove_spawn_callback, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_remove_spawn_callback, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__44));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_remove_spawn_callback, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 558, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); /* … */ <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_1, (PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet, __pyx_n_s_remove_spawn_callback);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_codeobj__44 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __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_remove_spawn_callback, 558, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 558, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0559</span>: """</pre> <pre class="cython line score-0"> <span class="">0560</span>: remove_spawn_callback(callback) -> None</pre> <pre class="cython line score-0"> <span class="">0561</span>: </pre> <pre class="cython line score-0"> <span class="">0562</span>: Remove *callback* function added with :meth:`Greenlet.add_spawn_callback`.</pre> <pre class="cython line score-0"> <span class="">0563</span>: This function will not fail if *callback* has been already removed or</pre> <pre class="cython line score-0"> <span class="">0564</span>: if *callback* was never added.</pre> <pre class="cython line score-0"> <span class="">0565</span>: </pre> <pre class="cython line score-0"> <span class="">0566</span>: .. versionadded:: 1.4.0</pre> <pre class="cython line score-0"> <span class="">0567</span>: """</pre> <pre class="cython line score-0"> <span class="">0568</span>: global _spawn_callbacks</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0569</span>: if _spawn_callbacks is not None:</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_6gevent_9_greenlet__spawn_callbacks != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0570</span>: _spawn_callbacks.discard(callback)</pre> <pre class='cython code score-7 '> if (unlikely(__pyx_v_6gevent_9_greenlet__spawn_callbacks == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard"); <span class='error_goto'>__PYX_ERR(0, 570, __pyx_L1_error)</span> } __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PySet_Discard</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks, __pyx_v_callback);<span class='error_goto'> if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 570, __pyx_L1_error)</span> </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0571</span>: if not _spawn_callbacks:</pre> <pre class='cython code score-1 '> __pyx_t_2 = (__pyx_v_6gevent_9_greenlet__spawn_callbacks != Py_None)&&(<span class='py_macro_api'>PySet_GET_SIZE</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks) != 0); __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0572</span>: _spawn_callbacks = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks, ((PyObject*)Py_None)); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); </pre><pre class="cython line score-0"> <span class="">0573</span>: </pre> <pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0574</span>: @classmethod</pre> <pre class='cython code score-14 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Method_ClassMethod</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_spawn, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 575, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); </pre><pre class="cython line score-38" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0575</span>: def spawn(cls, *args, **kwargs):</pre> <pre class='cython code score-38 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_29spawn(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_28spawn[] = "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_9_greenlet_8Greenlet_29spawn = {"spawn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_29spawn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_28spawn}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_29spawn(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("spawn (wrapper)", 0); if (unlikely(__pyx_kwds) && unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "spawn", 1))) return NULL; if (unlikely(__pyx_kwds)) { __pyx_v_kwargs = <span class='py_c_api'>PyDict_Copy</span>(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_kwargs); } else { __pyx_v_kwargs = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_args); __pyx_v_args = __pyx_args; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_28spawn(((PyTypeObject*)__pyx_v_cls), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_args); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_kwargs); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_28spawn(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_g = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("spawn", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.spawn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_g); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__45 = <span class='py_c_api'>PyTuple_Pack</span>(4, __pyx_n_s_cls, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_g);<span class='error_goto'> if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 575, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__45); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__45); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_29spawn, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_spawn, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__46));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_spawn, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 575, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); /* … */ <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet, __pyx_n_s_spawn);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_codeobj__46 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __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_spawn, 575, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 575, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0576</span>: """</pre> <pre class="cython line score-0"> <span class="">0577</span>: spawn(function, *args, **kwargs) -> Greenlet</pre> <pre class="cython line score-0"> <span class="">0578</span>: </pre> <pre class="cython line score-0"> <span class="">0579</span>: Create a new :class:`Greenlet` object and schedule it to run ``function(*args, **kwargs)``.</pre> <pre class="cython line score-0"> <span class="">0580</span>: This can be used as ``gevent.spawn`` or ``Greenlet.spawn``.</pre> <pre class="cython line score-0"> <span class="">0581</span>: </pre> <pre class="cython line score-0"> <span class="">0582</span>: The arguments are passed to :meth:`Greenlet.__init__`.</pre> <pre class="cython line score-0"> <span class="">0583</span>: </pre> <pre class="cython line score-0"> <span class="">0584</span>: .. versionchanged:: 1.1b1</pre> <pre class="cython line score-0"> <span class="">0585</span>: If a *function* is given that is not callable, immediately raise a :exc:`TypeError`</pre> <pre class="cython line score-0"> <span class="">0586</span>: instead of spawning a greenlet that will raise an uncaught TypeError.</pre> <pre class="cython line score-0"> <span class="">0587</span>: """</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0588</span>: g = cls(*args, **kwargs)</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(((PyObject *)__pyx_v_cls), __pyx_v_args, __pyx_v_kwargs);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_g = __pyx_t_1; __pyx_t_1 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0589</span>: g.start()</pre> <pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_start);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 589, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0590</span>: return g</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_g); __pyx_r = __pyx_v_g; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0591</span>: </pre> <pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0592</span>: @classmethod</pre> <pre class='cython code score-14 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Method_ClassMethod</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_spawn_later, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 593, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); </pre><pre class="cython line score-64" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0593</span>: def spawn_later(cls, seconds, *args, **kwargs):</pre> <pre class='cython code score-64 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_31spawn_later(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_30spawn_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_9_greenlet_8Greenlet_31spawn_later = {"spawn_later", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_31spawn_later, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_30spawn_later}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_31spawn_later(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_seconds = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("spawn_later (wrapper)", 0); __pyx_v_kwargs = <span class='py_c_api'>PyDict_New</span>(); if (unlikely(!__pyx_v_kwargs)) return NULL; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_kwargs); if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) > 1) { __pyx_v_args = <span class='py_c_api'>PyTuple_GetSlice</span>(__pyx_args, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); if (unlikely(!__pyx_v_args)) { <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; } <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_seconds,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { default: case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_seconds)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "spawn_later") < 0)) <span class='error_goto'>__PYX_ERR(0, 593, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); } __pyx_v_seconds = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("spawn_later", 0, 1, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 593, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_args); __pyx_v_args = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_kwargs); __pyx_v_kwargs = 0; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.spawn_later", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_30spawn_later(((PyTypeObject*)__pyx_v_cls), __pyx_v_seconds, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_args); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_kwargs); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_30spawn_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; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("spawn_later", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.spawn_later", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_g); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__47 = <span class='py_c_api'>PyTuple_Pack</span>(5, __pyx_n_s_cls, __pyx_n_s_seconds, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_g);<span class='error_goto'> if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 593, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__47); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__47); /* … */ __pyx_t_1 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_31spawn_later, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_spawn_later, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__48));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_spawn_later, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 593, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); /* … */ <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_1, (PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet, __pyx_n_s_spawn_later);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_codeobj__48 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __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_spawn_later, 593, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 593, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0594</span>: """</pre> <pre class="cython line score-0"> <span class="">0595</span>: spawn_later(seconds, function, *args, **kwargs) -> Greenlet</pre> <pre class="cython line score-0"> <span class="">0596</span>: </pre> <pre class="cython line score-0"> <span class="">0597</span>: Create and return a new `Greenlet` object scheduled to run ``function(*args, **kwargs)``</pre> <pre class="cython line score-0"> <span class="">0598</span>: in a future loop iteration *seconds* later. This can be used as ``Greenlet.spawn_later``</pre> <pre class="cython line score-0"> <span class="">0599</span>: or ``gevent.spawn_later``.</pre> <pre class="cython line score-0"> <span class="">0600</span>: </pre> <pre class="cython line score-0"> <span class="">0601</span>: The arguments are passed to :meth:`Greenlet.__init__`.</pre> <pre class="cython line score-0"> <span class="">0602</span>: </pre> <pre class="cython line score-0"> <span class="">0603</span>: .. versionchanged:: 1.1b1</pre> <pre class="cython line score-0"> <span class="">0604</span>: If an argument that's meant to be a function (the first argument in *args*, or the ``run`` keyword )</pre> <pre class="cython line score-0"> <span class="">0605</span>: is given to this classmethod (and not a classmethod of a subclass),</pre> <pre class="cython line score-0"> <span class="">0606</span>: it is verified to be callable. Previously, the spawned greenlet would have failed</pre> <pre class="cython line score-0"> <span class="">0607</span>: when it started running.</pre> <pre class="cython line score-0"> <span class="">0608</span>: """</pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0609</span>: if cls is Greenlet and not args and 'run' not in kwargs:</pre> <pre class='cython code score-3 '> __pyx_t_2 = (__pyx_v_cls == __pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_args) != 0); __pyx_t_2 = ((!__pyx_t_3) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = (<span class='pyx_c_api'>__Pyx_PyDict_ContainsTF</span>(__pyx_n_s_run, __pyx_v_kwargs, Py_NE)); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 609, __pyx_L1_error)</span> __pyx_t_3 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* … */ } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0610</span>: raise TypeError("")</pre> <pre class='cython code score-10 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_TypeError, __pyx_tuple__9, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_4, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='error_goto'>__PYX_ERR(0, 610, __pyx_L1_error)</span> /* … */ __pyx_tuple__9 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s__5);<span class='error_goto'> if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 610, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__9); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__9); </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0611</span>: g = cls(*args, **kwargs)</pre> <pre class='cython code score-2 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(((PyObject *)__pyx_v_cls), __pyx_v_args, __pyx_v_kwargs);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_v_g = __pyx_t_4; __pyx_t_4 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0612</span>: g.start_later(seconds)</pre> <pre class='cython code score-17 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_start_later);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_seconds) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_v_seconds); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 612, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0613</span>: return g</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_g); __pyx_r = __pyx_v_g; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0614</span>: </pre> <pre class="cython line score-56" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0615</span>: def kill(self, exception=GreenletExit, block=True, timeout=None):</pre> <pre class='cython code score-56 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_33kill(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_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 dies or the optional timeout expires.\n If block is ``False``, the current greenlet is not unscheduled.\n\n The function always returns ``None`` and never raises an error.\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.\n\n See also :func:`gevent.kill`.\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 prevent it from ever being switched to.\n "; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_33kill = {"kill", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_33kill, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_32kill}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_33kill(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_exception = 0; PyObject *__pyx_v_block = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("kill (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exception,&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[3] = {0,0,0}; values[0] = __pyx_k__10; values[1] = ((PyObject *)Py_True); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_exception); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "kill") < 0)) <span class='error_goto'>__PYX_ERR(0, 615, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__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:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("kill", 0, 0, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 615, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.kill", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_32kill(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), __pyx_v_exception, __pyx_v_block, __pyx_v_timeout); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_32kill(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_exception, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) { PyObject *__pyx_v_waiter = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("kill", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.kill", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_waiter); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_GreenletExit); __pyx_k__10 = __pyx_v_6gevent_9_greenlet_GreenletExit; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_6gevent_9_greenlet_GreenletExit); /* … */ __pyx_tuple__49 = <span class='py_c_api'>PyTuple_Pack</span>(5, __pyx_n_s_self_2, __pyx_n_s_exception, __pyx_n_s_block, __pyx_n_s_timeout, __pyx_n_s_waiter);<span class='error_goto'> if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 615, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__49); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__49); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_33kill, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_kill, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__50));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_kill_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 615, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__50 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(4, 0, 5, 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_kill_2, 615, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 615, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0616</span>: """</pre> <pre class="cython line score-0"> <span class="">0617</span>: Raise the ``exception`` in the greenlet.</pre> <pre class="cython line score-0"> <span class="">0618</span>: </pre> <pre class="cython line score-0"> <span class="">0619</span>: If ``block`` is ``True`` (the default), wait until the greenlet dies or the optional timeout expires.</pre> <pre class="cython line score-0"> <span class="">0620</span>: If block is ``False``, the current greenlet is not unscheduled.</pre> <pre class="cython line score-0"> <span class="">0621</span>: </pre> <pre class="cython line score-0"> <span class="">0622</span>: The function always returns ``None`` and never raises an error.</pre> <pre class="cython line score-0"> <span class="">0623</span>: </pre> <pre class="cython line score-0"> <span class="">0624</span>: .. note::</pre> <pre class="cython line score-0"> <span class="">0625</span>: </pre> <pre class="cython line score-0"> <span class="">0626</span>: Depending on what this greenlet is executing and the state</pre> <pre class="cython line score-0"> <span class="">0627</span>: of the event loop, the exception may or may not be raised</pre> <pre class="cython line score-0"> <span class="">0628</span>: immediately when this greenlet resumes execution. It may</pre> <pre class="cython line score-0"> <span class="">0629</span>: be raised on a subsequent green call, or, if this greenlet</pre> <pre class="cython line score-0"> <span class="">0630</span>: exits before making such a call, it may not be raised at</pre> <pre class="cython line score-0"> <span class="">0631</span>: all. As of 1.1, an example where the exception is raised</pre> <pre class="cython line score-0"> <span class="">0632</span>: later is if this greenlet had called :func:`sleep(0)</pre> <pre class="cython line score-0"> <span class="">0633</span>: <gevent.sleep>`; an example where the exception is raised</pre> <pre class="cython line score-0"> <span class="">0634</span>: immediately is if this greenlet had called</pre> <pre class="cython line score-0"> <span class="">0635</span>: :func:`sleep(0.1) <gevent.sleep>`.</pre> <pre class="cython line score-0"> <span class="">0636</span>: </pre> <pre class="cython line score-0"> <span class="">0637</span>: .. caution::</pre> <pre class="cython line score-0"> <span class="">0638</span>: </pre> <pre class="cython line score-0"> <span class="">0639</span>: Use care when killing greenlets. If the code executing is not</pre> <pre class="cython line score-0"> <span class="">0640</span>: exception safe (e.g., makes proper use of ``finally``) then an</pre> <pre class="cython line score-0"> <span class="">0641</span>: unexpected exception could result in corrupted state.</pre> <pre class="cython line score-0"> <span class="">0642</span>: </pre> <pre class="cython line score-0"> <span class="">0643</span>: See also :func:`gevent.kill`.</pre> <pre class="cython line score-0"> <span class="">0644</span>: </pre> <pre class="cython line score-0"> <span class="">0645</span>: :keyword type exception: The type of exception to raise in the greenlet. The default</pre> <pre class="cython line score-0"> <span class="">0646</span>: is :class:`GreenletExit`, which indicates a :meth:`successful` completion</pre> <pre class="cython line score-0"> <span class="">0647</span>: of the greenlet.</pre> <pre class="cython line score-0"> <span class="">0648</span>: </pre> <pre class="cython line score-0"> <span class="">0649</span>: .. versionchanged:: 0.13.0</pre> <pre class="cython line score-0"> <span class="">0650</span>: *block* is now ``True`` by default.</pre> <pre class="cython line score-0"> <span class="">0651</span>: .. versionchanged:: 1.1a2</pre> <pre class="cython line score-0"> <span class="">0652</span>: If this greenlet had never been switched to, killing it will prevent it from ever being switched to.</pre> <pre class="cython line score-0"> <span class="">0653</span>: """</pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0654</span>: self.__cancel_start()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___cancel_start(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0655</span>: </pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0656</span>: if self.dead:</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_dead);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 656, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* … */ goto __pyx_L3; } </pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0657</span>: self.__handle_death_before_start((exception,))</pre> <pre class='cython code score-9 '> __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_exception); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_exception); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_v_exception); __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___handle_death_before_start(__pyx_v_self, ((PyObject*)__pyx_t_1));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">0658</span>: else:</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0659</span>: waiter = Waiter() if block else None # pylint:disable=undefined-variable</pre> <pre class='cython code score-5 '> /*else*/ { __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_block); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 659, __pyx_L1_error)</span> if (__pyx_t_2) { __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(((PyObject *)__pyx_ptype_6gevent_8__waiter_Waiter));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_1 = 0; } else { <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); __pyx_t_3 = Py_None; } __pyx_v_waiter = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-53" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0660</span>: self.parent.loop.run_callback(_kill, self, exception, waiter)</pre> <pre class='cython code score-53 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_n_s_kill);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_v_exception, __pyx_v_waiter}; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_v_exception, __pyx_v_waiter}; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(4+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); if (__pyx_t_5) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 1+__pyx_t_6, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_exception); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_exception); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 2+__pyx_t_6, __pyx_v_exception); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_waiter); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_waiter); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 3+__pyx_t_6, __pyx_v_waiter); __pyx_t_4 = 0; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0661</span>: if block:</pre> <pre class='cython code score-2 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_block); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 661, __pyx_L1_error)</span> if (__pyx_t_2) { /* … */ } } __pyx_L3:; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0662</span>: waiter.get()</pre> <pre class='cython code score-19 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_waiter, __pyx_n_s_get_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_7 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_7)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); } } __pyx_t_3 = (__pyx_t_7) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_1, __pyx_t_7) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 662, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0663</span>: self.join(timeout)</pre> <pre class='cython code score-1 '> __pyx_t_8.__pyx_n = 1; __pyx_t_8.timeout = __pyx_v_timeout; __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->join(__pyx_v_self, 0, &__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 663, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">0664</span>: # it should be OK to use kill() in finally or kill a greenlet from more than one place;</pre> <pre class="cython line score-0"> <span class="">0665</span>: # thus it should not raise when the greenlet is already killed (= not started)</pre> <pre class="cython line score-0"> <span class="">0666</span>: </pre> <pre class="cython line score-54" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0667</span>: def get(self, block=True, timeout=None):</pre> <pre class='cython code score-54 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_35get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_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_9_greenlet_8Greenlet_35get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_35get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_34get}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_35get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_block = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_True); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) <span class='error_goto'>__PYX_ERR(0, 667, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__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:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("get", 0, 0, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 667, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.get", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_34get(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), __pyx_v_block, __pyx_v_timeout); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_34get(struct __pyx_obj_6gevent_9_greenlet_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; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_19); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_20); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_switch); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_t); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__51 = <span class='py_c_api'>PyTuple_Pack</span>(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);<span class='error_goto'> if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 667, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__51); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__51); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_35get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_get, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__52));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_get_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 667, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__52 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_get_2, 667, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 667, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0668</span>: """</pre> <pre class="cython line score-0"> <span class="">0669</span>: get(block=True, timeout=None) -> object</pre> <pre class="cython line score-0"> <span class="">0670</span>: </pre> <pre class="cython line score-0"> <span class="">0671</span>: Return the result the greenlet has returned or re-raise the</pre> <pre class="cython line score-0"> <span class="">0672</span>: exception it has raised.</pre> <pre class="cython line score-0"> <span class="">0673</span>: </pre> <pre class="cython line score-0"> <span class="">0674</span>: If block is ``False``, raise :class:`gevent.Timeout` if the</pre> <pre class="cython line score-0"> <span class="">0675</span>: greenlet is still alive. If block is ``True``, unschedule the</pre> <pre class="cython line score-0"> <span class="">0676</span>: current greenlet until the result is available or the timeout</pre> <pre class="cython line score-0"> <span class="">0677</span>: expires. In the latter case, :class:`gevent.Timeout` is</pre> <pre class="cython line score-0"> <span class="">0678</span>: raised.</pre> <pre class="cython line score-0"> <span class="">0679</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0680</span>: if self.ready():</pre> <pre class='cython code score-0 '> __pyx_t_1 = (((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0) != 0); if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0681</span>: if self.successful():</pre> <pre class='cython code score-0 '> __pyx_t_1 = (((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->successful(__pyx_v_self, 0) != 0); if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0682</span>: return self.value</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->value); __pyx_r = __pyx_v_self->value; goto __pyx_L0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0683</span>: self._raise_exception()</pre> <pre class='cython code score-19 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_raise_exception);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 683, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0684</span>: if not block:</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_block); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 684, __pyx_L1_error)</span> __pyx_t_5 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_5)) { /* … */ } </pre><pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0685</span>: raise Timeout()</pre> <pre class='cython code score-20 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_Timeout); __pyx_t_3 = __pyx_v_6gevent_9_greenlet_Timeout; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 685, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='error_goto'>__PYX_ERR(0, 685, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0686</span>: </pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0687</span>: switch = getcurrent().switch # pylint:disable=undefined-variable</pre> <pre class='cython code score-3 '> __pyx_t_2 = ((PyObject *)__pyx_f_6gevent_9_greenlet_getcurrent());<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_switch = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0688</span>: self.rawlink(switch)</pre> <pre class='cython code score-1 '> __pyx_t_3 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->rawlink(__pyx_v_self, __pyx_v_switch, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0689</span>: try:</pre> <pre class='cython code score-9 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L11_try_end; __pyx_L6_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L11_try_end:; } </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0690</span>: t = Timeout._start_new_or_dummy(timeout)</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_6gevent_9_greenlet_Timeout, __pyx_n_s_start_new_or_dummy);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_timeout) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_v_timeout); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 690, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_t = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0691</span>: try:</pre> <pre class='cython code score-0 '> /*try:*/ { </pre><pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0692</span>: result = self.parent.switch()</pre> <pre class='cython code score-21 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L13_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L13_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 692, __pyx_L13_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0693</span>: if result is not self:</pre> <pre class='cython code score-0 '> __pyx_t_5 = (__pyx_v_result != ((PyObject *)__pyx_v_self)); __pyx_t_1 = (__pyx_t_5 != 0); if (unlikely(__pyx_t_1)) { /* … */ } } </pre><pre class="cython line score-29" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0694</span>: raise InvalidSwitchError('Invalid switch into Greenlet.get(): %r' % (result, ))</pre> <pre class='cython code score-29 '> __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L13_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_result); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_v_result); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Invalid_switch_into_Greenlet_get, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L13_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_InvalidSwitchError); __pyx_t_4 = __pyx_v_6gevent_9_greenlet_InvalidSwitchError; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_9 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_9)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 694, __pyx_L13_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_3, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='error_goto'>__PYX_ERR(0, 694, __pyx_L13_error)</span> </pre><pre class="cython line score-0"> <span class="">0695</span>: finally:</pre> <pre class="cython line score-57" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0696</span>: t.cancel()</pre> <pre class='cython code score-57 '> /*finally:*/ { /*normal exit:*/{ __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_t, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 696, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 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; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_18); __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_t, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 696, __pyx_L17_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_18); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_16, __pyx_t_17, __pyx_t_18); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__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_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L6_error; __pyx_L17_error:; if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_18); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_16, __pyx_t_17, __pyx_t_18); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); __pyx_t_13 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); __pyx_t_14 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__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:; } </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0697</span>: except:</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.get", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 697, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); </pre><pre class="cython line score-0"> <span class="">0698</span>: # unlinking in 'except' instead of finally is an optimization:</pre> <pre class="cython line score-0"> <span class="">0699</span>: # if switch occurred normally then link was already removed in _notify_links</pre> <pre class="cython line score-0"> <span class="">0700</span>: # and there's no need to touch the links set.</pre> <pre class="cython line score-0"> <span class="">0701</span>: # Note, however, that if "Invalid switch" assert was removed and invalid switch</pre> <pre class="cython line score-0"> <span class="">0702</span>: # did happen, the link would remain, causing another invalid switch later in this greenlet.</pre> <pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0703</span>: self.unlink(switch)</pre> <pre class='cython code score-17 '> __pyx_t_19 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_unlink);<span class='error_goto'> if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 703, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_19); __pyx_t_20 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_19))) { __pyx_t_20 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_19); if (likely(__pyx_t_20)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_19); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_20); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_19, function); } } __pyx_t_9 = (__pyx_t_20) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_20, __pyx_v_switch) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_19, __pyx_v_switch); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_20); __pyx_t_20 = 0; if (unlikely(!__pyx_t_9)) <span class='error_goto'>__PYX_ERR(0, 703, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_19); __pyx_t_19 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0704</span>: raise</pre> <pre class='cython code score-2 '> <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_ErrRestoreWithState</span>(__pyx_t_3, __pyx_t_4, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; <span class='error_goto'>__PYX_ERR(0, 704, __pyx_L8_except_error)</span> } __pyx_L8_except_error:; </pre><pre class="cython line score-0"> <span class="">0705</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0706</span>: if self.ready():</pre> <pre class='cython code score-0 '> __pyx_t_1 = (((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0) != 0); if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0707</span>: if self.successful():</pre> <pre class='cython code score-0 '> __pyx_t_1 = (((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->successful(__pyx_v_self, 0) != 0); if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0708</span>: return self.value</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->value); __pyx_r = __pyx_v_self->value; goto __pyx_L0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0709</span>: self._raise_exception()</pre> <pre class='cython code score-19 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_raise_exception);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 709, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0710</span>: </pre> <pre class="cython line score-85" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0711</span>: def join(self, timeout=None):</pre> <pre class='cython code score-85 '>static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_37join(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet_join(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_9_greenlet_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; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_join);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_9_greenlet_8Greenlet_37join)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_timeout) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_v_timeout); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 711, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_19); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_20); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_switch); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_t); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_ex); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_37join(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_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_9_greenlet_8Greenlet_37join = {"join", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_37join, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_36join}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_37join(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "join") < 0)) <span class='error_goto'>__PYX_ERR(0, 711, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__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:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("join", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 711, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_36join(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), __pyx_v_timeout); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_36join(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_timeout) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("join", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.timeout = __pyx_v_timeout; __pyx_t_1 = __pyx_vtabptr_6gevent_9_greenlet_Greenlet->join(__pyx_v_self, 1, &__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__53 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self_2, __pyx_n_s_timeout);<span class='error_goto'> if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 711, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__53); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__53); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_37join, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_join, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__54));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_join, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 711, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__54 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_join, 711, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 711, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0712</span>: """</pre> <pre class="cython line score-0"> <span class="">0713</span>: join(timeout=None) -> None</pre> <pre class="cython line score-0"> <span class="">0714</span>: </pre> <pre class="cython line score-0"> <span class="">0715</span>: Wait until the greenlet finishes or *timeout* expires. Return</pre> <pre class="cython line score-0"> <span class="">0716</span>: ``None`` regardless.</pre> <pre class="cython line score-0"> <span class="">0717</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0718</span>: if self.ready():</pre> <pre class='cython code score-0 '> __pyx_t_5 = (((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0) != 0); if (__pyx_t_5) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0719</span>: return</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0720</span>: </pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0721</span>: switch = getcurrent().switch # pylint:disable=undefined-variable</pre> <pre class='cython code score-3 '> __pyx_t_1 = ((PyObject *)__pyx_f_6gevent_9_greenlet_getcurrent());<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_switch = __pyx_t_2; __pyx_t_2 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0722</span>: self.rawlink(switch)</pre> <pre class='cython code score-1 '> __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->rawlink(__pyx_v_self, __pyx_v_switch, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0723</span>: try:</pre> <pre class='cython code score-11 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_try_end; __pyx_L4_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L5_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L9_try_end:; } </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0724</span>: t = Timeout._start_new_or_dummy(timeout)</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_6gevent_9_greenlet_Timeout, __pyx_n_s_start_new_or_dummy);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_v_timeout) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_1, __pyx_v_timeout); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 724, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_t = __pyx_t_2; __pyx_t_2 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0725</span>: try:</pre> <pre class='cython code score-0 '> /*try:*/ { </pre><pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0726</span>: result = self.parent.switch()</pre> <pre class='cython code score-21 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L11_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L11_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 726, __pyx_L11_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0727</span>: if result is not self:</pre> <pre class='cython code score-0 '> __pyx_t_5 = (__pyx_v_result != ((PyObject *)__pyx_v_self)); __pyx_t_9 = (__pyx_t_5 != 0); if (unlikely(__pyx_t_9)) { /* … */ } } </pre><pre class="cython line score-29" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0728</span>: raise InvalidSwitchError('Invalid switch into Greenlet.join(): %r' % (result, ))</pre> <pre class='cython code score-29 '> __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 728, __pyx_L11_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_result); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_v_result); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Invalid_switch_into_Greenlet_joi, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L11_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_InvalidSwitchError); __pyx_t_3 = __pyx_v_6gevent_9_greenlet_InvalidSwitchError; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 728, __pyx_L11_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='error_goto'>__PYX_ERR(0, 728, __pyx_L11_error)</span> </pre><pre class="cython line score-0"> <span class="">0729</span>: finally:</pre> <pre class="cython line score-57" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0730</span>: t.cancel()</pre> <pre class='cython code score-57 '> /*finally:*/ { /*normal exit:*/{ __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_t, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 730, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L12; } __pyx_L11_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; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_18); __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_t, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L15_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 730, __pyx_L15_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_18); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_16, __pyx_t_17, __pyx_t_18); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__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_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L4_error; __pyx_L15_error:; if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_18); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_16, __pyx_t_17, __pyx_t_18); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); __pyx_t_13 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); __pyx_t_14 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; goto __pyx_L4_error; } __pyx_L12:; } </pre><pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0731</span>: except Timeout as ex:</pre> <pre class='cython code score-25 '> __pyx_t_11 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_v_6gevent_9_greenlet_Timeout); if (__pyx_t_11) { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_2, &__pyx_t_3, &__pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 731, __pyx_L6_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_v_ex = __pyx_t_3; /*try:*/ { /* … */ /*finally:*/ { /*normal exit:*/{ <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_ex); __pyx_v_ex = NULL; goto __pyx_L22; } __pyx_L21_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_20); __pyx_t_20 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_19); __pyx_t_19 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_18); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13); __pyx_t_11 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_21 = __pyx_filename; { <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_ex); __pyx_v_ex = NULL; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_14, __pyx_t_13); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_18); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_18, __pyx_t_17, __pyx_t_16); __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_15 = 0; __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_21; goto __pyx_L6_except_error; } __pyx_L22:; } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5_exception_handled; } </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0732</span>: self.unlink(switch)</pre> <pre class='cython code score-17 '> __pyx_t_19 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_unlink);<span class='error_goto'> if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 732, __pyx_L21_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_19); __pyx_t_20 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_19))) { __pyx_t_20 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_19); if (likely(__pyx_t_20)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_19); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_20); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_19, function); } } __pyx_t_4 = (__pyx_t_20) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_20, __pyx_v_switch) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_19, __pyx_v_switch); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_20); __pyx_t_20 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 732, __pyx_L21_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_19); __pyx_t_19 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0733</span>: if ex is not t:</pre> <pre class='cython code score-2 '> if (unlikely(!__pyx_v_t)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>("t"); <span class='error_goto'>__PYX_ERR(0, 733, __pyx_L21_error)</span> } __pyx_t_9 = (__pyx_v_ex != __pyx_v_t); __pyx_t_5 = (__pyx_t_9 != 0); if (unlikely(__pyx_t_5)) { /* … */ } } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0734</span>: raise</pre> <pre class='cython code score-2 '> <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_ErrRestoreWithState</span>(__pyx_t_2, __pyx_t_3, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; <span class='error_goto'>__PYX_ERR(0, 734, __pyx_L21_error)</span> </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0735</span>: except:</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.join", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 735, __pyx_L6_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0736</span>: self.unlink(switch)</pre> <pre class='cython code score-17 '> __pyx_t_19 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_unlink);<span class='error_goto'> if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 736, __pyx_L6_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_19); __pyx_t_20 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_19))) { __pyx_t_20 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_19); if (likely(__pyx_t_20)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_19); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_20); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_19, function); } } __pyx_t_4 = (__pyx_t_20) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_20, __pyx_v_switch) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_19, __pyx_v_switch); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_20); __pyx_t_20 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 736, __pyx_L6_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_19); __pyx_t_19 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0737</span>: raise</pre> <pre class='cython code score-2 '> <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_ErrRestoreWithState</span>(__pyx_t_1, __pyx_t_3, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; <span class='error_goto'>__PYX_ERR(0, 737, __pyx_L6_except_error)</span> } __pyx_L6_except_error:; </pre><pre class="cython line score-0"> <span class="">0738</span>: </pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0739</span>: def _report_result(self, result):</pre> <pre class='cython code score-7 '>static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet__report_result(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_result) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_report_result", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._report_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0740</span>: self._exc_info = (None, None, None)</pre> <pre class='cython code score-7 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_tuple__11); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__11); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_exc_info); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_exc_info); __pyx_v_self->_exc_info = __pyx_tuple__11; /* … */ __pyx_tuple__11 = <span class='py_c_api'>PyTuple_Pack</span>(3, Py_None, Py_None, Py_None);<span class='error_goto'> if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 740, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__11); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__11); </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0741</span>: self.value = result</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->value); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->value); __pyx_v_self->value = __pyx_v_result; </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0742</span>: if self._links and not self._notifier:</pre> <pre class='cython code score-3 '> __pyx_t_2 = (__pyx_v_self->_links != Py_None)&&(<span class='py_macro_api'>PyList_GET_SIZE</span>(__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 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->_notifier); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 742, __pyx_L1_error)</span> __pyx_t_3 = ((!__pyx_t_2) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0743</span>: self._notifier = self.parent.loop.run_callback(self._notify_links)</pre> <pre class='cython code score-26 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_5, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 743, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_6, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_notify_links);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 743, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_7 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_7)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 743, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_notifier); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_notifier); __pyx_v_self->_notifier = __pyx_t_4; __pyx_t_4 = 0; </pre><pre class="cython line score-0"> <span class="">0744</span>: </pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0745</span>: def _report_error(self, exc_info):</pre> <pre class='cython code score-11 '>static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet__report_error(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_exc_info) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_report_error", 0); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_exc_info); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._report_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_exc_info); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0746</span>: if isinstance(exc_info[1], GreenletExit):</pre> <pre class='cython code score-15 '> if (unlikely(__pyx_v_exc_info == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 746, __pyx_L1_error)</span> } __pyx_t_1 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = __pyx_v_6gevent_9_greenlet_GreenletExit; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_3 = <span class='py_c_api'>PyObject_IsInstance</span>(__pyx_t_1, __pyx_t_2);<span class='error_goto'> if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 746, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* … */ } </pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0747</span>: self._report_result(exc_info[1])</pre> <pre class='cython code score-9 '> if (unlikely(__pyx_v_exc_info == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 747, __pyx_L1_error)</span> } __pyx_t_2 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 747, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_report_result(__pyx_v_self, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0748</span>: return</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0749</span>: </pre> <pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0750</span>: self._exc_info = exc_info[0], exc_info[1], dump_traceback(exc_info[2])</pre> <pre class='cython code score-46 '> if (unlikely(__pyx_v_exc_info == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 750, __pyx_L1_error)</span> } __pyx_t_1 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(__pyx_v_exc_info == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 750, __pyx_L1_error)</span> } __pyx_t_2 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (unlikely(__pyx_v_exc_info == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 750, __pyx_L1_error)</span> } __pyx_t_6 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_dump_traceback); __pyx_t_7 = __pyx_v_6gevent_9_greenlet_dump_traceback; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_7))) { __pyx_t_8 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_7, __pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) <span class='error_goto'>__PYX_ERR(0, 750, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 750, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 1, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 2, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_exc_info); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_exc_info); __pyx_v_self->_exc_info = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; </pre><pre class="cython line score-0"> <span class="">0751</span>: </pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0752</span>: if self._links and not self._notifier:</pre> <pre class='cython code score-3 '> __pyx_t_3 = (__pyx_v_self->_links != Py_None)&&(<span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_self->_links) != 0); if (__pyx_t_3) { } else { __pyx_t_4 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->_notifier); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 752, __pyx_L1_error)</span> __pyx_t_9 = ((!__pyx_t_3) != 0); __pyx_t_4 = __pyx_t_9; __pyx_L5_bool_binop_done:; if (__pyx_t_4) { /* … */ } </pre><pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0753</span>: self._notifier = self.parent.loop.run_callback(self._notify_links)</pre> <pre class='cython code score-26 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 753, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_5, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 753, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_notify_links);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) <span class='error_goto'>__PYX_ERR(0, 753, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_notifier); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_notifier); __pyx_v_self->_notifier = __pyx_t_7; __pyx_t_7 = 0; </pre><pre class="cython line score-0"> <span class="">0754</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0755</span>: try:</pre> <pre class='cython code score-0 '> /*try:*/ { </pre><pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0756</span>: self.parent.handle_error(self, *exc_info)</pre> <pre class='cython code score-28 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 756, __pyx_L8_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_7, __pyx_n_s_handle_error);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 756, __pyx_L8_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 756, __pyx_L8_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, ((PyObject *)__pyx_v_self)); if (unlikely(__pyx_v_exc_info == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable"); <span class='error_goto'>__PYX_ERR(0, 756, __pyx_L8_error)</span> } __pyx_t_2 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_7, __pyx_v_exc_info);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L8_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_5, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 756, __pyx_L8_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; } </pre><pre class="cython line score-0"> <span class="">0757</span>: finally:</pre> <pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0758</span>: del exc_info</pre> <pre class='cython code score-18 '> /*finally:*/ { /*normal exit:*/{ <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_exc_info); __pyx_v_exc_info = NULL; goto __pyx_L9; } __pyx_L8_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; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_18); __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_exc_info); __pyx_v_exc_info = NULL; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_18); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_16, __pyx_t_17, __pyx_t_18); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__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_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L1_error; } __pyx_L9:; } </pre><pre class="cython line score-0"> <span class="">0759</span>: </pre> <pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0760</span>: def run(self):</pre> <pre class='cython code score-30 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_39run(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_38run[] = "Greenlet.run(self)"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_39run = {"run", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_39run, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_38run}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_39run(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("run (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_38run(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_38run(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("run", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__55 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self_2, __pyx_n_s_result);<span class='error_goto'> if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 760, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__55); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__55); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_39run, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_run, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__56));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_run, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 760, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__56 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_run, 760, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 760, __pyx_L1_error)</span> </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0761</span>: try:</pre> <pre class='cython code score-0 '> /*try:*/ { </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0762</span>: self.__cancel_start()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->__pyx___cancel_start(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0763</span>: self._start_event = _start_completed_event</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_6gevent_9_greenlet__start_completed_event)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_6gevent_9_greenlet__start_completed_event)); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_start_event); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_start_event); __pyx_v_self->_start_event = ((PyObject *)__pyx_v_6gevent_9_greenlet__start_completed_event); </pre><pre class="cython line score-0"> <span class="">0764</span>: </pre> <pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0765</span>: try:</pre> <pre class='cython code score-9 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_try_end; __pyx_L6_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L4_error; __pyx_L9_except_return:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L3_return; __pyx_L11_try_end:; } </pre><pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0766</span>: result = self._run(*self.args, **self.kwargs)</pre> <pre class='cython code score-15 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_run_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (unlikely(__pyx_v_self->args == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable"); <span class='error_goto'>__PYX_ERR(0, 766, __pyx_L6_error)</span> } if (unlikely(__pyx_v_self->kwargs == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); <span class='error_goto'>__PYX_ERR(0, 766, __pyx_L6_error)</span> } __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_v_self->args, __pyx_v_self->kwargs);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 766, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_5; __pyx_t_5 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0767</span>: except: # pylint:disable=bare-except</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.run", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_5, &__pyx_t_1, &__pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 767, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); </pre><pre class="cython line score-29" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0768</span>: self._report_error(sys_exc_info())</pre> <pre class='cython code score-29 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_sys_exc_info); __pyx_t_8 = __pyx_v_6gevent_9_greenlet_sys_exc_info; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_8))) { __pyx_t_9 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_8, function); } } __pyx_t_7 = (__pyx_t_9) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_8, __pyx_t_9) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) <span class='error_goto'>__PYX_ERR(0, 768, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; if (!(likely(<span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_t_7))||((__pyx_t_7) == Py_None)||(<span class='py_c_api'>PyErr_Format</span>(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_7)->tp_name), 0))) <span class='error_goto'>__PYX_ERR(0, 768, __pyx_L8_except_error)</span> __pyx_t_8 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_report_error(__pyx_v_self, ((PyObject*)__pyx_t_7));<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 768, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0769</span>: return</pre> <pre class='cython code score-5 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_except_return; } __pyx_L8_except_error:; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0770</span>: self._report_result(result)</pre> <pre class='cython code score-1 '> __pyx_t_6 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->_report_result(__pyx_v_self, __pyx_v_result);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L4_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; } </pre><pre class="cython line score-0"> <span class="">0771</span>: finally:</pre> <pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0772</span>: self.__dict__.pop('_run', None)</pre> <pre class='cython code score-32 '> /*finally:*/ { /*normal exit:*/{ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_dict);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_6, __pyx_n_s_pop);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_tuple__12, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_dict);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L15_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_6, __pyx_n_s_pop);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L15_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_tuple__12, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L15_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_dict);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_6, __pyx_n_s_pop);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_tuple__12, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; /* … */ __pyx_tuple__12 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_run_2, Py_None);<span class='error_goto'> if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 772, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__12); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__12); </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0773</span>: self.args = ()</pre> <pre class='cython code score-6 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_empty_tuple); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_empty_tuple); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->args); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->args); __pyx_v_self->args = __pyx_empty_tuple; /* … */ <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_empty_tuple); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_empty_tuple); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->args); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->args); __pyx_v_self->args = __pyx_empty_tuple; /* … */ <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_empty_tuple); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_empty_tuple); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->args); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->args); __pyx_v_self->args = __pyx_empty_tuple; </pre><pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0774</span>: self.kwargs.clear()</pre> <pre class='cython code score-42 '> if (unlikely(__pyx_v_self->kwargs == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); <span class='error_goto'>__PYX_ERR(0, 774, __pyx_L1_error)</span> } __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyDict_Clear</span>(__pyx_v_self->kwargs);<span class='error_goto'> if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L1_error)</span> goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename; { /* … */ if (unlikely(__pyx_v_self->kwargs == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); <span class='error_goto'>__PYX_ERR(0, 774, __pyx_L15_error)</span> } __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyDict_Clear</span>(__pyx_v_self->kwargs);<span class='error_goto'> if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L15_error)</span> } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_14, __pyx_t_15, __pyx_t_16); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_4, __pyx_t_3, __pyx_t_2); __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13; goto __pyx_L1_error; __pyx_L15_error:; if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_14, __pyx_t_15, __pyx_t_16); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; goto __pyx_L1_error; } __pyx_L3_return: { __pyx_t_16 = __pyx_r; __pyx_r = 0; /* … */ if (unlikely(__pyx_v_self->kwargs == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); <span class='error_goto'>__PYX_ERR(0, 774, __pyx_L1_error)</span> } __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyDict_Clear</span>(__pyx_v_self->kwargs);<span class='error_goto'> if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 774, __pyx_L1_error)</span> __pyx_r = __pyx_t_16; __pyx_t_16 = 0; goto __pyx_L0; } __pyx_L5:; } </pre><pre class="cython line score-0"> <span class="">0775</span>: </pre> <pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0776</span>: def _run(self):</pre> <pre class='cython code score-20 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_41_run(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_40_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_9_greenlet_8Greenlet_41_run = {"_run", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_41_run, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_40_run}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_41_run(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_run (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_40_run(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_40_run(CYTHON_UNUSED struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_run", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__57 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 776, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__57); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__57); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_41_run, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet__run, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__58));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_run_2, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 776, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__58 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_run_2, 776, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 776, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0777</span>: """</pre> <pre class="cython line score-0"> <span class="">0778</span>: Subclasses may override this method to take any number of</pre> <pre class="cython line score-0"> <span class="">0779</span>: arguments and keyword arguments.</pre> <pre class="cython line score-0"> <span class="">0780</span>: </pre> <pre class="cython line score-0"> <span class="">0781</span>: .. versionadded:: 1.1a3</pre> <pre class="cython line score-0"> <span class="">0782</span>: Previously, if no callable object was</pre> <pre class="cython line score-0"> <span class="">0783</span>: passed to the constructor, the spawned greenlet would later</pre> <pre class="cython line score-0"> <span class="">0784</span>: fail with an AttributeError.</pre> <pre class="cython line score-0"> <span class="">0785</span>: """</pre> <pre class="cython line score-0"> <span class="">0786</span>: # We usually override this in __init__</pre> <pre class="cython line score-0"> <span class="">0787</span>: # pylint: disable=method-hidden</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0788</span>: return</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0789</span>: </pre> <pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0790</span>: def has_links(self):</pre> <pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_43has_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static int __pyx_f_6gevent_9_greenlet_8Greenlet_has_links(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_has_links);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_9_greenlet_8Greenlet_43has_links)) { <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 790, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 790, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("gevent._greenlet.Greenlet.has_links", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_43has_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_42has_links[] = "Greenlet.has_links(self) -> bool"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_43has_links = {"has_links", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_43has_links, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_42has_links}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_43has_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("has_links (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_42has_links(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_42has_links(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("has_links", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>(__pyx_f_6gevent_9_greenlet_8Greenlet_has_links(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.has_links", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__59 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 790, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__59); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__59); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_43has_links, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_has_links, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__60));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_has_links, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 790, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__60 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_has_links, 790, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 790, __pyx_L1_error)</span> </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0791</span>: return len(self._links)</pre> <pre class='cython code score-8 '> __pyx_t_1 = __pyx_v_self->_links; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "object of type 'NoneType' has no len()"); <span class='error_goto'>__PYX_ERR(0, 791, __pyx_L1_error)</span> } __pyx_t_6 = <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 791, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0792</span>: </pre> <pre class="cython line score-61" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0793</span>: def rawlink(self, callback):</pre> <pre class='cython code score-61 '>static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_45rawlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/ static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet_rawlink(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_rawlink);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_9_greenlet_8Greenlet_45rawlink)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_callback) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_v_callback); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 793, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.rawlink", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_45rawlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_44rawlink[] = "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 .. caution:: The callable will be called in the HUB greenlet.\n "; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_45rawlink = {"rawlink", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_45rawlink, METH_O, __pyx_doc_6gevent_9_greenlet_8Greenlet_44rawlink}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_45rawlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("rawlink (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_44rawlink(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), ((PyObject *)__pyx_v_callback)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_44rawlink(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("rawlink", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_9_greenlet_8Greenlet_rawlink(__pyx_v_self, __pyx_v_callback, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.rawlink", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__61 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self_2, __pyx_n_s_callback);<span class='error_goto'> if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 793, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__61); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__61); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_45rawlink, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_rawlink, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__62));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_rawlink, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 793, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__62 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_rawlink, 793, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 793, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0794</span>: """</pre> <pre class="cython line score-0"> <span class="">0795</span>: Register a callable to be executed when the greenlet finishes</pre> <pre class="cython line score-0"> <span class="">0796</span>: execution.</pre> <pre class="cython line score-0"> <span class="">0797</span>: </pre> <pre class="cython line score-0"> <span class="">0798</span>: The *callback* will be called with this instance as an</pre> <pre class="cython line score-0"> <span class="">0799</span>: argument.</pre> <pre class="cython line score-0"> <span class="">0800</span>: </pre> <pre class="cython line score-0"> <span class="">0801</span>: .. caution:: The callable will be called in the HUB greenlet.</pre> <pre class="cython line score-0"> <span class="">0802</span>: """</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0803</span>: if not callable(callback):</pre> <pre class='cython code score-2 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyCallable_Check</span>(__pyx_v_callback);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 803, __pyx_L1_error)</span> __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0); if (unlikely(__pyx_t_6)) { /* … */ } </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0804</span>: raise TypeError('Expected callable: %r' % (callback, ))</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_callback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_callback); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_v_callback); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Expected_callable_r, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_TypeError, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_1, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='error_goto'>__PYX_ERR(0, 804, __pyx_L1_error)</span> </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0805</span>: self._links.append(callback) # pylint:disable=no-member</pre> <pre class='cython code score-7 '> if (unlikely(__pyx_v_self->_links == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); <span class='error_goto'>__PYX_ERR(0, 805, __pyx_L1_error)</span> } __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_self->_links, __pyx_v_callback);<span class='error_goto'> if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 805, __pyx_L1_error)</span> </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0806</span>: if self.ready() and self._links and not self._notifier:</pre> <pre class='cython code score-3 '> __pyx_t_5 = (((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->ready(__pyx_v_self, 0) != 0); if (__pyx_t_5) { } else { __pyx_t_6 = __pyx_t_5; goto __pyx_L5_bool_binop_done; } __pyx_t_5 = (__pyx_v_self->_links != Py_None)&&(<span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_self->_links) != 0); if (__pyx_t_5) { } else { __pyx_t_6 = __pyx_t_5; goto __pyx_L5_bool_binop_done; } __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->_notifier); if (unlikely(__pyx_t_5 < 0)) <span class='error_goto'>__PYX_ERR(0, 806, __pyx_L1_error)</span> __pyx_t_8 = ((!__pyx_t_5) != 0); __pyx_t_6 = __pyx_t_8; __pyx_L5_bool_binop_done:; if (__pyx_t_6) { /* … */ } </pre><pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0807</span>: self._notifier = self.parent.loop.run_callback(self._notify_links)</pre> <pre class='cython code score-26 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_notify_links);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 807, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 807, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_notifier); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_notifier); __pyx_v_self->_notifier = __pyx_t_1; __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0808</span>: </pre> <pre class="cython line score-49" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0809</span>: def link(self, callback, SpawnedLink=SpawnedLink):</pre> <pre class='cython code score-49 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_47link(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_46link[] = "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 "; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_47link = {"link", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_47link, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_46link}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_47link(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_SpawnedLink = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("link (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k__13; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_SpawnedLink); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "link") < 0)) <span class='error_goto'>__PYX_ERR(0, 809, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__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:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("link", 0, 1, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 809, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.link", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_46link(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), __pyx_v_callback, __pyx_v_SpawnedLink); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_46link(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_SpawnedLink) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("link", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.link", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_SpawnedLink)); __pyx_k__13 = ((PyObject *)__pyx_ptype_6gevent_9_greenlet_SpawnedLink); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_ptype_6gevent_9_greenlet_SpawnedLink); /* … */ __pyx_tuple__63 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self_2, __pyx_n_s_callback, __pyx_n_s_SpawnedLink);<span class='error_goto'> if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 809, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__63); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__63); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_47link, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_link, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__64));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 809, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_link, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 809, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__64 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_link, 809, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 809, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0810</span>: """</pre> <pre class="cython line score-0"> <span class="">0811</span>: Link greenlet's completion to a callable.</pre> <pre class="cython line score-0"> <span class="">0812</span>: </pre> <pre class="cython line score-0"> <span class="">0813</span>: The *callback* will be called with this instance as an</pre> <pre class="cython line score-0"> <span class="">0814</span>: argument once this greenlet is dead. A callable is called in</pre> <pre class="cython line score-0"> <span class="">0815</span>: its own :class:`greenlet.greenlet` (*not* a</pre> <pre class="cython line score-0"> <span class="">0816</span>: :class:`Greenlet`).</pre> <pre class="cython line score-0"> <span class="">0817</span>: """</pre> <pre class="cython line score-0"> <span class="">0818</span>: # XXX: Is the redefinition of SpawnedLink supposed to just be an</pre> <pre class="cython line score-0"> <span class="">0819</span>: # optimization, or do people use it? It's not documented</pre> <pre class="cython line score-0"> <span class="">0820</span>: # pylint:disable=redefined-outer-name</pre> <pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0821</span>: self.rawlink(SpawnedLink(callback))</pre> <pre class='cython code score-17 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_SpawnedLink); __pyx_t_2 = __pyx_v_SpawnedLink; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_callback) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_v_callback); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 821, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_9_greenlet_Greenlet *)__pyx_v_self->__pyx_vtab)->rawlink(__pyx_v_self, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0822</span>: </pre> <pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0823</span>: def unlink(self, callback):</pre> <pre class='cython code score-26 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_49unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_48unlink[] = "Greenlet.unlink(self, callback)\nRemove the callback set by :meth:`link` or :meth:`rawlink`"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_49unlink = {"unlink", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_49unlink, METH_O, __pyx_doc_6gevent_9_greenlet_8Greenlet_48unlink}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_49unlink(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("unlink (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_48unlink(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), ((PyObject *)__pyx_v_callback)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_48unlink(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("unlink", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.unlink", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__65 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self_2, __pyx_n_s_callback);<span class='error_goto'> if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 823, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__65); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__65); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_49unlink, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_unlink, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__66));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_unlink, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 823, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__66 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_unlink, 823, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 823, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0824</span>: """Remove the callback set by :meth:`link` or :meth:`rawlink`"""</pre> <pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0825</span>: try:</pre> <pre class='cython code score-10 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0826</span>: self._links.remove(callback) # pylint:disable=no-member</pre> <pre class='cython code score-17 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->_links, __pyx_n_s_remove);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_callback) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_v_callback); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 826, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0827</span>: except ValueError:</pre> <pre class='cython code score-4 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_ValueError); if (__pyx_t_7) { <span class='pyx_c_api'>__Pyx_ErrRestore</span>(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; </pre><pre class="cython line score-0"> <span class="">0828</span>: pass</pre> <pre class="cython line score-0"> <span class="">0829</span>: </pre> <pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0830</span>: def unlink_all(self):</pre> <pre class='cython code score-23 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_51unlink_all(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_50unlink_all[] = "Greenlet.unlink_all(self)\n\n Remove all the callbacks.\n\n .. versionadded:: 1.3a2\n "; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_51unlink_all = {"unlink_all", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_51unlink_all, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_50unlink_all}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_51unlink_all(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("unlink_all (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_50unlink_all(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_50unlink_all(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("unlink_all", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.unlink_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__67 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 830, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__67); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__67); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_51unlink_all, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_unlink_all, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__68));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_unlink_all, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 830, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__68 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_unlink_all, 830, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 830, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0831</span>: """</pre> <pre class="cython line score-0"> <span class="">0832</span>: Remove all the callbacks.</pre> <pre class="cython line score-0"> <span class="">0833</span>: </pre> <pre class="cython line score-0"> <span class="">0834</span>: .. versionadded:: 1.3a2</pre> <pre class="cython line score-0"> <span class="">0835</span>: """</pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0836</span>: del self._links[:]</pre> <pre class='cython code score-7 '> if (unlikely(__pyx_v_self->_links == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not subscriptable"); <span class='error_goto'>__PYX_ERR(0, 836, __pyx_L1_error)</span> } if (<span class='pyx_c_api'>__Pyx_PyObject_DelSlice</span>(__pyx_v_self->_links, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) <span class='error_goto'>__PYX_ERR(0, 836, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0837</span>: </pre> <pre class="cython line score-50" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0838</span>: def link_value(self, callback, SpawnedLink=SuccessSpawnedLink):</pre> <pre class='cython code score-50 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_53link_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_52link_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_9_greenlet_8Greenlet_53link_value = {"link_value", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_53link_value, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_52link_value}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_53link_value(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_SpawnedLink = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("link_value (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k__14; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_SpawnedLink); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "link_value") < 0)) <span class='error_goto'>__PYX_ERR(0, 838, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__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:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("link_value", 0, 1, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 838, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.link_value", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_52link_value(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), __pyx_v_callback, __pyx_v_SpawnedLink); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_52link_value(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_SpawnedLink) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("link_value", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.link_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_SuccessSpawnedLink)); __pyx_k__14 = ((PyObject *)__pyx_ptype_6gevent_9_greenlet_SuccessSpawnedLink); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_ptype_6gevent_9_greenlet_SuccessSpawnedLink); /* … */ __pyx_tuple__69 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self_2, __pyx_n_s_callback, __pyx_n_s_SpawnedLink);<span class='error_goto'> if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 838, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__69); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__69); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_53link_value, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_link_value, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__70));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_link_value, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 838, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__70 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_link_value, 838, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 838, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0839</span>: """</pre> <pre class="cython line score-0"> <span class="">0840</span>: Like :meth:`link` but *callback* is only notified when the greenlet</pre> <pre class="cython line score-0"> <span class="">0841</span>: has completed successfully.</pre> <pre class="cython line score-0"> <span class="">0842</span>: """</pre> <pre class="cython line score-0"> <span class="">0843</span>: # pylint:disable=redefined-outer-name</pre> <pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0844</span>: self.link(callback, SpawnedLink=SpawnedLink)</pre> <pre class='cython code score-22 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_link);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_callback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_callback); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_v_callback); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 844, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_SpawnedLink, __pyx_v_SpawnedLink) < 0) <span class='error_goto'>__PYX_ERR(0, 844, __pyx_L1_error)</span> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-0"> <span class="">0845</span>: </pre> <pre class="cython line score-50" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0846</span>: def link_exception(self, callback, SpawnedLink=FailureSpawnedLink):</pre> <pre class='cython code score-50 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_55link_exception(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_54link_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_9_greenlet_8Greenlet_55link_exception = {"link_exception", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_8Greenlet_55link_exception, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_8Greenlet_54link_exception}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_55link_exception(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_SpawnedLink = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("link_exception (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_callback,&__pyx_n_s_SpawnedLink,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k__15; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_callback)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_SpawnedLink); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "link_exception") < 0)) <span class='error_goto'>__PYX_ERR(0, 846, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__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:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("link_exception", 0, 1, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 846, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.link_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_54link_exception(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self), __pyx_v_callback, __pyx_v_SpawnedLink); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_54link_exception(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_SpawnedLink) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("link_exception", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet.link_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet_FailureSpawnedLink)); __pyx_k__15 = ((PyObject *)__pyx_ptype_6gevent_9_greenlet_FailureSpawnedLink); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_ptype_6gevent_9_greenlet_FailureSpawnedLink); /* … */ __pyx_tuple__71 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self_2, __pyx_n_s_callback, __pyx_n_s_SpawnedLink);<span class='error_goto'> if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 846, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__71); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__71); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_55link_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet_link_exception, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__72));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_link_exception, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 846, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__72 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_link_exception, 846, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 846, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0847</span>: """</pre> <pre class="cython line score-0"> <span class="">0848</span>: Like :meth:`link` but *callback* is only notified when the</pre> <pre class="cython line score-0"> <span class="">0849</span>: greenlet dies because of an unhandled exception.</pre> <pre class="cython line score-0"> <span class="">0850</span>: """</pre> <pre class="cython line score-0"> <span class="">0851</span>: # pylint:disable=redefined-outer-name</pre> <pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0852</span>: self.link(callback, SpawnedLink=SpawnedLink)</pre> <pre class='cython code score-22 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_link);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_callback); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_callback); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_v_callback); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_SpawnedLink, __pyx_v_SpawnedLink) < 0) <span class='error_goto'>__PYX_ERR(0, 852, __pyx_L1_error)</span> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-0"> <span class="">0853</span>: </pre> <pre class="cython line score-68" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0854</span>: def _notify_links(self):</pre> <pre class='cython code score-68 '>static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_57_notify_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_9_greenlet_8Greenlet__notify_links(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_v_link = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_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) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_notify_links);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_9_greenlet_8Greenlet_57_notify_links)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 854, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._notify_links", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_link); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_57_notify_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_8Greenlet_56_notify_links[] = "Greenlet._notify_links(self)"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_8Greenlet_57_notify_links = {"_notify_links", (PyCFunction)__pyx_pw_6gevent_9_greenlet_8Greenlet_57_notify_links, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_8Greenlet_56_notify_links}; static PyObject *__pyx_pw_6gevent_9_greenlet_8Greenlet_57_notify_links(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_notify_links (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_8Greenlet_56_notify_links(((struct __pyx_obj_6gevent_9_greenlet_Greenlet *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_8Greenlet_56_notify_links(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_notify_links", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_9_greenlet_8Greenlet__notify_links(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._notify_links", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__73 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 854, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__73); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__73); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_8Greenlet_57_notify_links, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Greenlet__notify_links, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__74));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet_Greenlet->tp_dict, __pyx_n_s_notify_links, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 854, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet_Greenlet); __pyx_codeobj__74 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 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_notify_links, 854, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 854, __pyx_L1_error)</span> </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0855</span>: while self._links:</pre> <pre class='cython code score-1 '> while (1) { __pyx_t_5 = (__pyx_v_self->_links != Py_None)&&(<span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_self->_links) != 0); if (!__pyx_t_5) break; </pre><pre class="cython line score-0"> <span class="">0856</span>: # Early links are allowed to remove later links</pre> <pre class="cython line score-0"> <span class="">0857</span>: # before we get to them, and they're also allowed to</pre> <pre class="cython line score-0"> <span class="">0858</span>: # add new links, so we have to be careful about iterating.</pre> <pre class="cython line score-0"> <span class="">0859</span>: </pre> <pre class="cython line score-0"> <span class="">0860</span>: # We don't expect this list to be very large, so the time spent</pre> <pre class="cython line score-0"> <span class="">0861</span>: # manipulating it should be small. a deque is probably not justified.</pre> <pre class="cython line score-0"> <span class="">0862</span>: # Cython has optimizations to transform this into a memmove anyway.</pre> <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0863</span>: link = self._links.pop(0)</pre> <pre class='cython code score-8 '> if (unlikely(__pyx_v_self->_links == Py_None)) { <span class='py_c_api'>PyErr_Format</span>(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); <span class='error_goto'>__PYX_ERR(0, 863, __pyx_L1_error)</span> } __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyList_PopIndex</span>(__pyx_v_self->_links, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_link, __pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0864</span>: try:</pre> <pre class='cython code score-11 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L5_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L6_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L12_try_end:; } } </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0865</span>: link(self)</pre> <pre class='cython code score-16 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_link); __pyx_t_2 = __pyx_v_link; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 865, __pyx_L5_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0866</span>: except: # pylint:disable=bare-except</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.Greenlet._notify_links", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) <span class='error_goto'>__PYX_ERR(0, 866, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); </pre><pre class="cython line score-55" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0867</span>: self.parent.handle_error((link, self), *sys_exc_info())</pre> <pre class='cython code score-55 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_handle_error);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 867, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_link); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_link); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_v_link); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 1, ((PyObject *)__pyx_v_self)); __pyx_t_10 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 867, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_sys_exc_info); __pyx_t_11 = __pyx_v_6gevent_9_greenlet_sys_exc_info; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_11))) { __pyx_t_12 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_11); if (likely(__pyx_t_12)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_11, function); } } __pyx_t_4 = (__pyx_t_12) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_11, __pyx_t_12) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 867, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 867, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_10, __pyx_t_11);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_9, __pyx_t_4, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 867, __pyx_L7_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6_exception_handled; } __pyx_L7_except_error:; </pre><pre class="cython line score-0"> <span class="">0868</span>: </pre> <pre class="cython line score-0"> <span class="">0869</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0870</span>: class _dummy_event(object):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_9_greenlet__dummy_event { PyObject *(*stop)(struct __pyx_obj_6gevent_9_greenlet__dummy_event *, int __pyx_skip_dispatch); PyObject *(*start)(struct __pyx_obj_6gevent_9_greenlet__dummy_event *, PyObject *, int __pyx_skip_dispatch); PyObject *(*close)(struct __pyx_obj_6gevent_9_greenlet__dummy_event *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_6gevent_9_greenlet__dummy_event *__pyx_vtabptr_6gevent_9_greenlet__dummy_event; </pre><pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0871</span>: __slots__ = ('pending', 'active')</pre> <pre class='cython code score-15 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet__dummy_event->tp_dict, __pyx_n_s_slots, __pyx_tuple__75) < 0) <span class='error_goto'>__PYX_ERR(0, 871, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet__dummy_event); /* … */ __pyx_tuple__75 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_pending, __pyx_n_s_active);<span class='error_goto'> if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 871, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__75); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__75); </pre><pre class="cython line score-0"> <span class="">0872</span>: </pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0873</span>: def __init__(self):</pre> <pre class='cython code score-11 '>/* Python wrapper */ static int __pyx_pw_6gevent_9_greenlet_12_dummy_event_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6gevent_9_greenlet_12_dummy_event_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); if (unlikely(<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) > 0)) { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 0, 0, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(<span class='py_c_api'>PyDict_Size</span>(__pyx_kwds) > 0) && unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_6gevent_9_greenlet_12_dummy_event___init__(((struct __pyx_obj_6gevent_9_greenlet__dummy_event *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_9_greenlet_12_dummy_event___init__(struct __pyx_obj_6gevent_9_greenlet__dummy_event *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0874</span>: self.pending = self.active = False</pre> <pre class='cython code score-0 '> __pyx_v_self->pending = 0; __pyx_v_self->active = 0; </pre><pre class="cython line score-0"> <span class="">0875</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0876</span>: def stop(self):</pre> <pre class='cython code score-25 '>static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_9_greenlet_12_dummy_event_stop(CYTHON_UNUSED struct __pyx_obj_6gevent_9_greenlet__dummy_event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("stop", 0); /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_12_dummy_event_2stop[] = "_dummy_event.stop(self)"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_12_dummy_event_3stop = {"stop", (PyCFunction)__pyx_pw_6gevent_9_greenlet_12_dummy_event_3stop, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_12_dummy_event_2stop}; static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_3stop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("stop (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_12_dummy_event_2stop(((struct __pyx_obj_6gevent_9_greenlet__dummy_event *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_12_dummy_event_2stop(struct __pyx_obj_6gevent_9_greenlet__dummy_event *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("stop", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_9_greenlet_12_dummy_event_stop(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._dummy_event.stop", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__76 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 876, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__76); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__76); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_12_dummy_event_3stop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_dummy_event_stop, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__77));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet__dummy_event->tp_dict, __pyx_n_s_stop, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 876, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet__dummy_event); __pyx_codeobj__77 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_stop, 876, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 876, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0877</span>: pass</pre> <pre class="cython line score-0"> <span class="">0878</span>: </pre> <pre class="cython line score-27" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0879</span>: def start(self, cb): # pylint:disable=unused-argument</pre> <pre class='cython code score-27 '>static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_5start(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/ static PyObject *__pyx_f_6gevent_9_greenlet_12_dummy_event_start(CYTHON_UNUSED struct __pyx_obj_6gevent_9_greenlet__dummy_event *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_cb, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("start", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._dummy_event.start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_5start(PyObject *__pyx_v_self, PyObject *__pyx_v_cb); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_12_dummy_event_4start[] = "_dummy_event.start(self, cb)"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_12_dummy_event_5start = {"start", (PyCFunction)__pyx_pw_6gevent_9_greenlet_12_dummy_event_5start, METH_O, __pyx_doc_6gevent_9_greenlet_12_dummy_event_4start}; static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_5start(PyObject *__pyx_v_self, PyObject *__pyx_v_cb) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("start (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_12_dummy_event_4start(((struct __pyx_obj_6gevent_9_greenlet__dummy_event *)__pyx_v_self), ((PyObject *)__pyx_v_cb)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_12_dummy_event_4start(struct __pyx_obj_6gevent_9_greenlet__dummy_event *__pyx_v_self, PyObject *__pyx_v_cb) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("start", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_9_greenlet_12_dummy_event_start(__pyx_v_self, __pyx_v_cb, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._dummy_event.start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__78 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self_2, __pyx_n_s_cb);<span class='error_goto'> if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 879, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__78); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__78); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_12_dummy_event_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_dummy_event_start, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__79));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet__dummy_event->tp_dict, __pyx_n_s_start, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 879, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet__dummy_event); __pyx_codeobj__79 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 2, 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_start, 879, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 879, __pyx_L1_error)</span> </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0880</span>: raise AssertionError("Cannot start the dummy event")</pre> <pre class='cython code score-10 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_AssertionError, __pyx_tuple__16, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_1, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='error_goto'>__PYX_ERR(0, 880, __pyx_L1_error)</span> /* … */ __pyx_tuple__16 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_Cannot_start_the_dummy_event);<span class='error_goto'> if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 880, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__16); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__16); </pre><pre class="cython line score-0"> <span class="">0881</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0882</span>: def close(self):</pre> <pre class='cython code score-25 '>static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_9_greenlet_12_dummy_event_close(CYTHON_UNUSED struct __pyx_obj_6gevent_9_greenlet__dummy_event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("close", 0); /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_12_dummy_event_6close[] = "_dummy_event.close(self)"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_12_dummy_event_7close = {"close", (PyCFunction)__pyx_pw_6gevent_9_greenlet_12_dummy_event_7close, METH_NOARGS, __pyx_doc_6gevent_9_greenlet_12_dummy_event_6close}; static PyObject *__pyx_pw_6gevent_9_greenlet_12_dummy_event_7close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("close (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_9_greenlet_12_dummy_event_6close(((struct __pyx_obj_6gevent_9_greenlet__dummy_event *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_12_dummy_event_6close(struct __pyx_obj_6gevent_9_greenlet__dummy_event *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("close", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_9_greenlet_12_dummy_event_close(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._dummy_event.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__80 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self_2);<span class='error_goto'> if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 882, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__80); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__80); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_12_dummy_event_7close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_dummy_event_close, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__81));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_9_greenlet__dummy_event->tp_dict, __pyx_n_s_close, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 882, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_9_greenlet__dummy_event); __pyx_codeobj__81 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_close, 882, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 882, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0883</span>: pass</pre> <pre class="cython line score-0"> <span class="">0884</span>: </pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0885</span>: _cancelled_start_event = _dummy_event()</pre> <pre class='cython code score-3 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet__dummy_event));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(((PyObject *)__pyx_v_6gevent_9_greenlet__cancelled_start_event)); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet__cancelled_start_event, ((struct __pyx_obj_6gevent_9_greenlet__dummy_event *)__pyx_t_2)); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0886</span>: _start_completed_event = _dummy_event()</pre> <pre class='cython code score-3 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(((PyObject *)__pyx_ptype_6gevent_9_greenlet__dummy_event));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGOTREF</span>(((PyObject *)__pyx_v_6gevent_9_greenlet__start_completed_event)); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet__start_completed_event, ((struct __pyx_obj_6gevent_9_greenlet__dummy_event *)__pyx_t_2)); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0887</span>: </pre> <pre class="cython line score-0"> <span class="">0888</span>: </pre> <pre class="cython line score-56" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0889</span>: def _kill(glet, exception, waiter):</pre> <pre class='cython code score-56 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_1_kill(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet__kill[] = "_kill(glet, exception, waiter)"; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_1_kill = {"_kill", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_1_kill, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet__kill}; static PyObject *__pyx_pw_6gevent_9_greenlet_1_kill(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_glet = 0; PyObject *__pyx_v_exception = 0; PyObject *__pyx_v_waiter = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_kill (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_glet,&__pyx_n_s_exception,&__pyx_n_s_waiter,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_glet)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_exception)) != 0)) kw_args--; else { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("_kill", 1, 3, 3, 1); <span class='error_goto'>__PYX_ERR(0, 889, __pyx_L3_error)</span> } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_waiter)) != 0)) kw_args--; else { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("_kill", 1, 3, 3, 2); <span class='error_goto'>__PYX_ERR(0, 889, __pyx_L3_error)</span> } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_kill") < 0)) <span class='error_goto'>__PYX_ERR(0, 889, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); } __pyx_v_glet = values[0]; __pyx_v_exception = values[1]; __pyx_v_waiter = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("_kill", 1, 3, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 889, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._kill", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet__kill(__pyx_self, __pyx_v_glet, __pyx_v_exception, __pyx_v_waiter); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet__kill(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_glet, PyObject *__pyx_v_exception, PyObject *__pyx_v_waiter) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_kill", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._kill", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__82 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_glet, __pyx_n_s_exception, __pyx_n_s_waiter);<span class='error_goto'> if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 889, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__82); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__82); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_1_kill, 0, __pyx_n_s_kill, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__83));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_kill, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 889, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_codeobj__83 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_kill, 889, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 889, __pyx_L1_error)</span> </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0890</span>: try:</pre> <pre class='cython code score-10 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0891</span>: glet.throw(exception)</pre> <pre class='cython code score-17 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_glet, __pyx_n_s_throw);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_exception) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_v_exception); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 891, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0892</span>: except: # pylint:disable=bare-except</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._kill", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 892, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); </pre><pre class="cython line score-0"> <span class="">0893</span>: # XXX do we need this here?</pre> <pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0894</span>: glet.parent.handle_error(glet, *sys_exc_info())</pre> <pre class='cython code score-47 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_glet, __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_7, __pyx_n_s_handle_error);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_glet); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_glet); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_v_glet); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_sys_exc_info); __pyx_t_10 = __pyx_v_6gevent_9_greenlet_sys_exc_info; __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_10))) { __pyx_t_11 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_10, function); } } __pyx_t_9 = (__pyx_t_11) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_10, __pyx_t_11) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) <span class='error_goto'>__PYX_ERR(0, 894, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 894, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_7, __pyx_t_10);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 894, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_8, __pyx_t_9, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 894, __pyx_L5_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0895</span>: if waiter is not None:</pre> <pre class='cython code score-0 '> __pyx_t_12 = (__pyx_v_waiter != Py_None); __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { /* … */ } </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0896</span>: waiter.switch(None)</pre> <pre class='cython code score-17 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_waiter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, Py_None) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, Py_None); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 896, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; </pre><pre class="cython line score-0"> <span class="">0897</span>: </pre> <pre class="cython line score-0"> <span class="">0898</span>: </pre> <pre class="cython line score-57" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0899</span>: def joinall(greenlets, timeout=None, raise_error=False, count=None):</pre> <pre class='cython code score-57 '>static PyObject *__pyx_pw_6gevent_9_greenlet_3joinall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6gevent_9_greenlet_joinall(PyObject *__pyx_v_greenlets, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_9_greenlet_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; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("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:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.joinall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_done); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_obj); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_3joinall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_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_9_greenlet_3joinall = {"joinall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_3joinall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_2joinall}; static PyObject *__pyx_pw_6gevent_9_greenlet_3joinall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_greenlets = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_v_raise_error = 0; PyObject *__pyx_v_count = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("joinall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_greenlets,&__pyx_n_s_timeout,&__pyx_n_s_raise_error,&__pyx_n_s_count,0}; PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_False); values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_greenlets)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_raise_error); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_count); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "joinall") < 0)) <span class='error_goto'>__PYX_ERR(0, 899, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__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:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("joinall", 0, 1, 4, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 899, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.joinall", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_2joinall(__pyx_self, __pyx_v_greenlets, __pyx_v_timeout, __pyx_v_raise_error, __pyx_v_count); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_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; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("joinall", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__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_9_greenlet_joinall(__pyx_v_greenlets, 0, &__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.joinall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__84 = <span class='py_c_api'>PyTuple_Pack</span>(4, __pyx_n_s_greenlets, __pyx_n_s_timeout, __pyx_n_s_raise_error, __pyx_n_s_count);<span class='error_goto'> if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 899, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__84); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__84); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_3joinall, 0, __pyx_n_s_joinall, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__85));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_joinall, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 899, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_codeobj__85 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_greenlet_py, __pyx_n_s_joinall, 899, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 899, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">0900</span>: """</pre> <pre class="cython line score-0"> <span class="">0901</span>: Wait for the ``greenlets`` to finish.</pre> <pre class="cython line score-0"> <span class="">0902</span>: </pre> <pre class="cython line score-0"> <span class="">0903</span>: :param greenlets: A sequence (supporting :func:`len`) of greenlets to wait for.</pre> <pre class="cython line score-0"> <span class="">0904</span>: :keyword float timeout: If given, the maximum number of seconds to wait.</pre> <pre class="cython line score-0"> <span class="">0905</span>: :return: A sequence of the greenlets that finished before the timeout (if any)</pre> <pre class="cython line score-0"> <span class="">0906</span>: expired.</pre> <pre class="cython line score-0"> <span class="">0907</span>: """</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0908</span>: if not raise_error:</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_raise_error); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 908, __pyx_L1_error)</span> __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-24" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0909</span>: return wait(greenlets, timeout=timeout, count=count)</pre> <pre class='cython code score-24 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_greenlets); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_greenlets); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_v_greenlets); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_n_s_timeout, __pyx_v_timeout) < 0) <span class='error_goto'>__PYX_ERR(0, 909, __pyx_L1_error)</span> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_n_s_count, __pyx_v_count) < 0) <span class='error_goto'>__PYX_ERR(0, 909, __pyx_L1_error)</span> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_v_6gevent_9_greenlet_wait, __pyx_t_3, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 909, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0910</span>: </pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0911</span>: done = []</pre> <pre class='cython code score-5 '> __pyx_t_5 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 911, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_v_done = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; </pre><pre class="cython line score-67" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0912</span>: for obj in iwait(greenlets, timeout=timeout, count=count):</pre> <pre class='cython code score-67 '> __pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 912, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_greenlets); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_greenlets); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_v_greenlets); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_n_s_timeout, __pyx_v_timeout) < 0) <span class='error_goto'>__PYX_ERR(0, 912, __pyx_L1_error)</span> if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_4, __pyx_n_s_count, __pyx_v_count) < 0) <span class='error_goto'>__PYX_ERR(0, 912, __pyx_L1_error)</span> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_v_6gevent_9_greenlet_iwait, __pyx_t_5, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_3)) || <span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext;<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 912, __pyx_L1_error)</span> } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_4))) { if (__pyx_t_6 >= <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_t_4, __pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) <span class='error_goto'>__PYX_ERR(0, 912, __pyx_L1_error)</span> #else __pyx_t_3 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_4, __pyx_t_6); __pyx_t_6++;<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); #endif } else { if (__pyx_t_6 >= <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_t_4, __pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) <span class='error_goto'>__PYX_ERR(0, 912, __pyx_L1_error)</span> #else __pyx_t_3 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_4, __pyx_t_6); __pyx_t_6++;<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = <span class='py_c_api'>PyErr_Occurred</span>(); if (exc_type) { if (likely(<span class='pyx_c_api'>__Pyx_PyErr_GivenExceptionMatches</span>(exc_type, PyExc_StopIteration))) <span class='py_c_api'>PyErr_Clear</span>(); else <span class='error_goto'>__PYX_ERR(0, 912, __pyx_L1_error)</span> } break; } <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); } <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_obj, __pyx_t_3); __pyx_t_3 = 0; /* … */ } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0913</span>: if getattr(obj, 'exception', None) is not None:</pre> <pre class='cython code score-1 '> __pyx_t_3 = __Pyx_GetAttr3(__pyx_v_obj, __pyx_n_s_exception, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 913, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_2 = (__pyx_t_3 != Py_None); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0914</span>: if hasattr(obj, '_raise_exception'):</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_HasAttr</span>(__pyx_v_obj, __pyx_n_s_raise_exception);<span class='error_goto'> if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 914, __pyx_L1_error)</span> __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* … */ goto __pyx_L7; } </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0915</span>: obj._raise_exception()</pre> <pre class='cython code score-19 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_obj, __pyx_n_s_raise_exception);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_8 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_8) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_t_8) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 915, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">0916</span>: else:</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0917</span>: raise obj.exception</pre> <pre class='cython code score-5 '> /*else*/ { __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_obj, __pyx_n_s_exception);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_3, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='error_goto'>__PYX_ERR(0, 917, __pyx_L1_error)</span> } __pyx_L7:; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0918</span>: done.append(obj)</pre> <pre class='cython code score-2 '> __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_done, __pyx_v_obj);<span class='error_goto'> if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 918, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0919</span>: return done</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_done); __pyx_r = __pyx_v_done; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">0920</span>: </pre> <pre class="cython line score-0"> <span class="">0921</span>: </pre> <pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0922</span>: def _killall3(greenlets, exception, waiter):</pre> <pre class='cython code score-14 '>static PyObject *__pyx_f_6gevent_9_greenlet__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; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_killall3", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_15); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._killall3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_diehards); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_g); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0923</span>: diehards = []</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_diehards = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0924</span>: for g in greenlets:</pre> <pre class='cython code score-12 '> if (unlikely(__pyx_v_greenlets == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable"); <span class='error_goto'>__PYX_ERR(0, 924, __pyx_L1_error)</span> } __pyx_t_1 = __pyx_v_greenlets; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_t_1, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) <span class='error_goto'>__PYX_ERR(0, 924, __pyx_L1_error)</span> #else __pyx_t_3 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_1, __pyx_t_2); __pyx_t_2++;<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); #endif <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_g, __pyx_t_3); __pyx_t_3 = 0; /* … */ } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0925</span>: if not g.dead:</pre> <pre class='cython code score-5 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_dead);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) <span class='error_goto'>__PYX_ERR(0, 925, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* … */ } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0926</span>: try:</pre> <pre class='cython code score-10 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L7_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L13_try_end:; } </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0927</span>: g.throw(exception)</pre> <pre class='cython code score-17 '> __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_throw);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 927, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_9))) { __pyx_t_10 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_9, function); } } __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exception) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_9, __pyx_v_exception); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 927, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0928</span>: except: # pylint:disable=bare-except</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._killall3", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_3, &__pyx_t_9, &__pyx_t_10) < 0) <span class='error_goto'>__PYX_ERR(0, 928, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); </pre><pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0929</span>: g.parent.handle_error(g, *sys_exc_info())</pre> <pre class='cython code score-47 '> __pyx_t_11 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 929, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11); __pyx_t_12 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_11, __pyx_n_s_handle_error);<span class='error_goto'> if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 929, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 929, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_g); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_g); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_11, 0, __pyx_v_g); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_sys_exc_info); __pyx_t_14 = __pyx_v_6gevent_9_greenlet_sys_exc_info; __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_14))) { __pyx_t_15 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_14); if (likely(__pyx_t_15)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_15); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_14, function); } } __pyx_t_13 = (__pyx_t_15) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_14, __pyx_t_15) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_13)) <span class='error_goto'>__PYX_ERR(0, 929, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_13);<span class='error_goto'> if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 929, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_11, __pyx_t_14);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 929, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_12, __pyx_t_13, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 929, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_14); __pyx_t_14 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0930</span>: if not g.dead:</pre> <pre class='cython code score-5 '> __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_dead);<span class='error_goto'> if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 930, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_10); if (unlikely(__pyx_t_5 < 0)) <span class='error_goto'>__PYX_ERR(0, 930, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_4 = ((!__pyx_t_5) != 0); if (__pyx_t_4) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0931</span>: diehards.append(g)</pre> <pre class='cython code score-2 '> __pyx_t_16 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_diehards, __pyx_v_g);<span class='error_goto'> if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 931, __pyx_L1_error)</span> </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0932</span>: waiter.switch(diehards)</pre> <pre class='cython code score-17 '> __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_waiter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 932, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_10))) { __pyx_t_9 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_10); if (likely(__pyx_t_9)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_10, function); } } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_v_diehards) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_10, __pyx_v_diehards); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 932, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">0933</span>: </pre> <pre class="cython line score-0"> <span class="">0934</span>: </pre> <pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0935</span>: def _killall(greenlets, exception):</pre> <pre class='cython code score-13 '>static PyObject *__pyx_f_6gevent_9_greenlet__killall(PyObject *__pyx_v_greenlets, PyObject *__pyx_v_exception) { PyObject *__pyx_v_g = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_killall", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_15); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._killall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_g); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0936</span>: for g in greenlets:</pre> <pre class='cython code score-12 '> if (unlikely(__pyx_v_greenlets == Py_None)) { <span class='py_c_api'>PyErr_SetString</span>(PyExc_TypeError, "'NoneType' object is not iterable"); <span class='error_goto'>__PYX_ERR(0, 936, __pyx_L1_error)</span> } __pyx_t_1 = __pyx_v_greenlets; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= <span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = <span class='py_macro_api'>PyList_GET_ITEM</span>(__pyx_t_1, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) <span class='error_goto'>__PYX_ERR(0, 936, __pyx_L1_error)</span> #else __pyx_t_3 = <span class='py_macro_api'>PySequence_ITEM</span>(__pyx_t_1, __pyx_t_2); __pyx_t_2++;<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); #endif <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_g, __pyx_t_3); __pyx_t_3 = 0; /* … */ } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0937</span>: if not g.dead:</pre> <pre class='cython code score-5 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_dead);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) <span class='error_goto'>__PYX_ERR(0, 937, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* … */ } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0938</span>: try:</pre> <pre class='cython code score-10 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L13_try_end; __pyx_L6_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L7_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L13_try_end:; } </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0939</span>: g.throw(exception)</pre> <pre class='cython code score-17 '> __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_throw);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 939, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_9))) { __pyx_t_10 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_9, function); } } __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_exception) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_9, __pyx_v_exception); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 939, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0940</span>: except: # pylint:disable=bare-except</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._killall", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_3, &__pyx_t_9, &__pyx_t_10) < 0) <span class='error_goto'>__PYX_ERR(0, 940, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); </pre><pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0941</span>: g.parent.handle_error(g, *sys_exc_info())</pre> <pre class='cython code score-47 '> __pyx_t_11 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_g, __pyx_n_s_parent);<span class='error_goto'> if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 941, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11); __pyx_t_12 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_11, __pyx_n_s_handle_error);<span class='error_goto'> if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 941, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 941, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_g); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_g); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_11, 0, __pyx_v_g); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_sys_exc_info); __pyx_t_14 = __pyx_v_6gevent_9_greenlet_sys_exc_info; __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_14))) { __pyx_t_15 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_14); if (likely(__pyx_t_15)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_15); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_14, function); } } __pyx_t_13 = (__pyx_t_15) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_14, __pyx_t_15) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_13)) <span class='error_goto'>__PYX_ERR(0, 941, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_13);<span class='error_goto'> if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 941, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_11, __pyx_t_14);<span class='error_goto'> if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 941, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_13); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_12, __pyx_t_13, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 941, __pyx_L8_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_14); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_13); __pyx_t_13 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_14); __pyx_t_14 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L7_exception_handled; } __pyx_L8_except_error:; </pre><pre class="cython line score-0"> <span class="">0942</span>: </pre> <pre class="cython line score-0"> <span class="">0943</span>: </pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0944</span>: def _call_spawn_callbacks(gr):</pre> <pre class='cython code score-7 '>static void __pyx_f_6gevent_9_greenlet__call_spawn_callbacks(struct __pyx_obj_6gevent_9_greenlet_Greenlet *__pyx_v_gr) { PyObject *__pyx_v_cb = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_call_spawn_callbacks", 0); /* … */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet._call_spawn_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_cb); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0945</span>: if _spawn_callbacks is not None:</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_6gevent_9_greenlet__spawn_callbacks != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0946</span>: for cb in _spawn_callbacks:</pre> <pre class='cython code score-2 '> __pyx_t_4 = 0; __pyx_t_7 = __Pyx_set_iterator(__pyx_v_6gevent_9_greenlet__spawn_callbacks, 1, (&__pyx_t_5), (&__pyx_t_6));<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = __pyx_t_7; __pyx_t_7 = 0; while (1) { __pyx_t_8 = __Pyx_set_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_7, __pyx_t_6); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) <span class='error_goto'>__PYX_ERR(0, 946, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_cb, __pyx_t_7); __pyx_t_7 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0947</span>: cb(gr)</pre> <pre class='cython code score-17 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_cb); __pyx_t_9 = __pyx_v_cb; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_9))) { __pyx_t_10 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_9, function); } } __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, ((PyObject *)__pyx_v_gr)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_9, ((PyObject *)__pyx_v_gr)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_7)) <span class='error_goto'>__PYX_ERR(0, 947, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">0948</span>: </pre> <pre class="cython line score-0"> <span class="">0949</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0950</span>: _spawn_callbacks = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_9_greenlet__spawn_callbacks, ((PyObject*)Py_None)); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); </pre><pre class="cython line score-0"> <span class="">0951</span>: </pre> <pre class="cython line score-0"> <span class="">0952</span>: </pre> <pre class="cython line score-96" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0953</span>: def killall(greenlets, exception=GreenletExit, block=True, timeout=None):</pre> <pre class='cython code score-96 '>static PyObject *__pyx_pf_6gevent_9_greenlet_7__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__defaults__", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(<span class='pyx_c_api'>__Pyx_CyFunction_Defaults</span>(__pyx_defaults, __pyx_self)->__pyx_arg_exception); <span class='refnanny'>__Pyx_GIVEREF</span>(<span class='pyx_c_api'>__Pyx_CyFunction_Defaults</span>(__pyx_defaults, __pyx_self)->__pyx_arg_exception); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, <span class='pyx_c_api'>__Pyx_CyFunction_Defaults</span>(__pyx_defaults, __pyx_self)->__pyx_arg_exception); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)Py_True)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)Py_True)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 1, ((PyObject *)Py_True)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)Py_None)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)Py_None)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 2, ((PyObject *)Py_None)); __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__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:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_6gevent_9_greenlet_5killall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_9_greenlet_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 thread.\n :keyword exception: The 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 "; static PyMethodDef __pyx_mdef_6gevent_9_greenlet_5killall = {"killall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_9_greenlet_5killall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_9_greenlet_4killall}; static PyObject *__pyx_pw_6gevent_9_greenlet_5killall(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_greenlets = 0; PyObject *__pyx_v_exception = 0; PyObject *__pyx_v_block = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("killall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_greenlets,&__pyx_n_s_exception,&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[4] = {0,0,0,0}; __pyx_defaults *__pyx_dynamic_args = <span class='pyx_c_api'>__Pyx_CyFunction_Defaults</span>(__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 (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_greenlets)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_exception); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "killall") < 0)) <span class='error_goto'>__PYX_ERR(0, 953, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 4: values[3] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__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:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("killall", 0, 1, 4, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 953, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.killall", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_9_greenlet_4killall(__pyx_self, __pyx_v_greenlets, __pyx_v_exception, __pyx_v_block, __pyx_v_timeout); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_9_greenlet_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_loop = NULL; struct __pyx_obj_6gevent_8__waiter_Waiter *__pyx_v_waiter = NULL; PyObject *__pyx_v_t = NULL; PyObject *__pyx_v_alive = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("killall", 0); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_greenlets); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._greenlet.killall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_loop); <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_waiter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_t); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_alive); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_greenlets); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__86 = <span class='py_c_api'>PyTuple_Pack</span>(8, __pyx_n_s_greenlets, __pyx_n_s_exception, __pyx_n_s_block, __pyx_n_s_timeout, __pyx_n_s_loop, __pyx_n_s_waiter, __pyx_n_s_t, __pyx_n_s_alive);<span class='error_goto'> if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 953, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__86); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__86); /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_9_greenlet_5killall, 0, __pyx_n_s_killall, NULL, __pyx_n_s_gevent__greenlet, __pyx_d, ((PyObject *)__pyx_codeobj__87));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (!<span class='pyx_c_api'>__Pyx_CyFunction_InitDefaults</span>(__pyx_t_2, sizeof(__pyx_defaults), 1)) <span class='error_goto'>__PYX_ERR(0, 953, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_9_greenlet_GreenletExit); <span class='pyx_c_api'>__Pyx_CyFunction_Defaults</span>(__pyx_defaults, __pyx_t_2)->__pyx_arg_exception = __pyx_v_6gevent_9_greenlet_GreenletExit; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_6gevent_9_greenlet_GreenletExit); <span class='pyx_c_api'>__Pyx_CyFunction_SetDefaultsGetter</span>(__pyx_t_2, __pyx_pf_6gevent_9_greenlet_7__defaults__); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_killall, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 953, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">0954</span>: """</pre> <pre class="cython line score-0"> <span class="">0955</span>: Forceably terminate all the ``greenlets`` by causing them to raise ``exception``.</pre> <pre class="cython line score-0"> <span class="">0956</span>: </pre> <pre class="cython line score-0"> <span class="">0957</span>: .. caution:: Use care when killing greenlets. If they are not prepared for exceptions,</pre> <pre class="cython line score-0"> <span class="">0958</span>: this could result in corrupted state.</pre> <pre class="cython line score-0"> <span class="">0959</span>: </pre> <pre class="cython line score-0"> <span class="">0960</span>: :param greenlets: A **bounded** iterable of the non-None greenlets to terminate.</pre> <pre class="cython line score-0"> <span class="">0961</span>: *All* the items in this iterable must be greenlets that belong to the same thread.</pre> <pre class="cython line score-0"> <span class="">0962</span>: :keyword exception: The exception to raise in the greenlets. By default this is</pre> <pre class="cython line score-0"> <span class="">0963</span>: :class:`GreenletExit`.</pre> <pre class="cython line score-0"> <span class="">0964</span>: :keyword bool block: If True (the default) then this function only returns when all the</pre> <pre class="cython line score-0"> <span class="">0965</span>: greenlets are dead; the current greenlet is unscheduled during that process.</pre> <pre class="cython line score-0"> <span class="">0966</span>: If greenlets ignore the initial exception raised in them,</pre> <pre class="cython line score-0"> <span class="">0967</span>: then they will be joined (with :func:`gevent.joinall`) and allowed to die naturally.</pre> <pre class="cython line score-0"> <span class="">0968</span>: If False, this function returns immediately and greenlets will raise</pre> <pre class="cython line score-0"> <span class="">0969</span>: the exception asynchronously.</pre> <pre class="cython line score-0"> <span class="">0970</span>: :keyword float timeout: A time in seconds to wait for greenlets to die. If given, it is</pre> <pre class="cython line score-0"> <span class="">0971</span>: only honored when ``block`` is True.</pre> <pre class="cython line score-0"> <span class="">0972</span>: :raise Timeout: If blocking and a timeout is given that elapses before</pre> <pre class="cython line score-0"> <span class="">0973</span>: all the greenlets are dead.</pre> <pre class="cython line score-0"> <span class="">0974</span>: </pre> <pre class="cython line score-0"> <span class="">0975</span>: .. versionchanged:: 1.1a2</pre> <pre class="cython line score-0"> <span class="">0976</span>: *greenlets* can be any iterable of greenlets, like an iterator or a set.</pre> <pre class="cython line score-0"> <span class="">0977</span>: Previously it had to be a list or tuple.</pre> <pre class="cython line score-0"> <span class="">0978</span>: """</pre> <pre class="cython line score-0"> <span class="">0979</span>: # support non-indexable containers like iterators or set objects</pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0980</span>: greenlets = list(greenlets)</pre> <pre class='cython code score-6 '> __pyx_t_1 = <span class='py_c_api'>PySequence_List</span>(__pyx_v_greenlets);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_greenlets, __pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0981</span>: if not greenlets:</pre> <pre class='cython code score-2 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_greenlets); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 981, __pyx_L1_error)</span> __pyx_t_3 = ((!__pyx_t_2) != 0); if (__pyx_t_3) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0982</span>: return</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0983</span>: loop = greenlets[0].loop</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_v_greenlets, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_loop = __pyx_t_4; __pyx_t_4 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0984</span>: if block:</pre> <pre class='cython code score-2 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_block); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 984, __pyx_L1_error)</span> if (__pyx_t_3) { /* … */ goto __pyx_L4; } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0985</span>: waiter = Waiter() # pylint:disable=undefined-variable</pre> <pre class='cython code score-2 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(((PyObject *)__pyx_ptype_6gevent_8__waiter_Waiter));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 985, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_v_waiter = ((struct __pyx_obj_6gevent_8__waiter_Waiter *)__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-45" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0986</span>: loop.run_callback(_killall3, greenlets, exception, waiter)</pre> <pre class='cython code score-45 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_loop, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_5 = __Pyx_CFunc_object____list____object____object___to_py(__pyx_f_6gevent_9_greenlet__killall3);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 986, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_5, __pyx_v_greenlets, __pyx_v_exception, ((PyObject *)__pyx_v_waiter)}; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_1)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_t_5, __pyx_v_greenlets, __pyx_v_exception, ((PyObject *)__pyx_v_waiter)}; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_8 = <span class='py_c_api'>PyTuple_New</span>(4+__pyx_t_7);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 986, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); if (__pyx_t_6) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 0+__pyx_t_7, __pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_greenlets); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_greenlets); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 1+__pyx_t_7, __pyx_v_greenlets); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_exception); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_exception); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 2+__pyx_t_7, __pyx_v_exception); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_waiter)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_waiter)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 3+__pyx_t_7, ((PyObject *)__pyx_v_waiter)); __pyx_t_5 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_8, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0987</span>: t = Timeout._start_new_or_dummy(timeout)</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_6gevent_9_greenlet_Timeout, __pyx_n_s_start_new_or_dummy);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_8 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_8)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); } } __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, __pyx_v_timeout) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_1, __pyx_v_timeout); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 987, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_t = __pyx_t_4; __pyx_t_4 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0988</span>: try:</pre> <pre class='cython code score-0 '> /*try:*/ { </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0989</span>: alive = waiter.get()</pre> <pre class='cython code score-0 '> __pyx_t_4 = ((struct __pyx_vtabstruct_6gevent_8__waiter_Waiter *)__pyx_v_waiter->__pyx_vtab)->get(__pyx_v_waiter, 0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 989, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_v_alive = __pyx_t_4; __pyx_t_4 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0990</span>: if alive:</pre> <pre class='cython code score-2 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_alive); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 990, __pyx_L6_error)</span> if (__pyx_t_3) { /* … */ } } </pre><pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0991</span>: joinall(alive, raise_error=False)</pre> <pre class='cython code score-22 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_n_s_joinall);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 991, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_alive); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_alive); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_v_alive); __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 991, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_8, __pyx_n_s_raise_error, Py_False) < 0) <span class='error_goto'>__PYX_ERR(0, 991, __pyx_L6_error)</span> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_t_1, __pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 991, __pyx_L6_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; </pre><pre class="cython line score-0"> <span class="">0992</span>: finally:</pre> <pre class="cython line score-58" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0993</span>: t.cancel()</pre> <pre class='cython code score-58 '> /*finally:*/ { /*normal exit:*/{ __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_t, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 993, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_8))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_8); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_8, function); } } __pyx_t_5 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_8, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) <span class='error_goto'>__PYX_ERR(0, 993, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L7; } __pyx_L6_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); __pyx_t_7 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; { __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_t, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 993, __pyx_L10_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_8))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_8); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_8, function); } } __pyx_t_5 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_8, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) <span class='error_goto'>__PYX_ERR(0, 993, __pyx_L10_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_14, __pyx_t_15, __pyx_t_16); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; goto __pyx_L1_error; __pyx_L10_error:; if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_14, __pyx_t_15, __pyx_t_16); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; goto __pyx_L1_error; } __pyx_L7:; } </pre><pre class="cython line score-0"> <span class="">0994</span>: else:</pre> <pre class="cython line score-43" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0995</span>: loop.run_callback(_killall, greenlets, exception)</pre> <pre class='cython code score-43 '> /*else*/ { __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_loop, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 995, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); __pyx_t_1 = __Pyx_CFunc_object____list____object___to_py(__pyx_f_6gevent_9_greenlet__killall);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_8))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_8); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_8, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_8)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_1, __pyx_v_greenlets, __pyx_v_exception}; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_8)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_1, __pyx_v_greenlets, __pyx_v_exception}; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 995, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (__pyx_t_4) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0+__pyx_t_9, __pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_greenlets); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_greenlets); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1+__pyx_t_9, __pyx_v_greenlets); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_exception); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_exception); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2+__pyx_t_9, __pyx_v_exception); __pyx_t_1 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_8, __pyx_t_6, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 995, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L4:; </pre><pre class="cython line score-0"> <span class="">0996</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0997</span>: def _init():</pre> <pre class='cython code score-0 '>static void __pyx_f_6gevent_9_greenlet__init(void) { <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_init", 0); /* … */ /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">0998</span>: greenlet_init() # pylint:disable=undefined-variable</pre> <pre class='cython code score-0 '> __pyx_f_6gevent_9_greenlet_greenlet_init(); </pre><pre class="cython line score-0"> <span class="">0999</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">1000</span>: _init()</pre> <pre class='cython code score-0 '> __pyx_f_6gevent_9_greenlet__init(); </pre><pre class="cython line score-0"> <span class="">1001</span>: </pre> <pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">1002</span>: from gevent._util import import_c_accel</pre> <pre class='cython code score-19 '> __pyx_t_2 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_import_c_accel); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_import_c_accel); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_import_c_accel); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__util, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_import_c_accel);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1002, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_import_c_accel, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 1002, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">1003</span>: import_c_accel(globals(), 'gevent._greenlet')</pre> <pre class='cython code score-17 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_import_c_accel);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1003, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_gevent__greenlet); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_gevent__greenlet); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 1, __pyx_n_s_gevent__greenlet); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_4, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1003, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre></div></body></html>