You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Resources/WPy64-3720/python-3.7.2.amd64/Lib/site-packages/gevent/event.html

3681 lines
277 KiB

<!DOCTYPE html>
<!-- Generated by Cython 0.29.2 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cython: event.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="event.c">event.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="">001</span>: # Copyright (c) 2009-2016 Denis Bilenko, gevent contributors. 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) &lt; 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">&#xA0;<span class="">002</span>: # cython: auto_pickle=False,embedsignature=True,always_allow_keywords=False,infer_types=True</pre>
<pre class="cython line score-0">&#xA0;<span class="">003</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">004</span>: """Basic synchronization primitives: Event and AsyncResult"""</pre>
<pre class="cython line score-0">&#xA0;<span class="">005</span>: from __future__ import print_function</pre>
<pre class="cython line score-0">&#xA0;<span class="">006</span>: </pre>
<pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">007</span>: from gevent._util import _NONE</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, 7, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_NONE);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_NONE);
<span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_NONE);
__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, 7, __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_NONE);<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);
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_NONE, __pyx_t_1) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 7, __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-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">008</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, 8, __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, 8, __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, 8, __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_6_event_reraise);
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_6_event_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-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">009</span>: from gevent._tblib import dump_traceback, load_traceback</pre>
<pre class='cython code score-23 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
<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_1, 0, __pyx_n_s_dump_traceback);
<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, 1, __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, 9, __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_dump_traceback);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __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_6_event_dump_traceback);
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_6_event_dump_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;
__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, 9, __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_6_event_load_traceback);
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_6_event_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">&#xA0;<span class="">010</span>: </pre>
<pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">011</span>: from gevent.timeout import Timeout</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, 11, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<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_2, 0, __pyx_n_s_Timeout);
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent_timeout, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __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_Timeout);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __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_6_event_Timeout);
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_6_event_Timeout, __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">&#xA0;<span class="">012</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">013</span>: </pre>
<pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">014</span>: __all__ = [</pre>
<pre class='cython code score-15 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Event);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Event);
<span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_Event);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_AsyncResult);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_AsyncResult);
<span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 1, __pyx_n_s_AsyncResult);
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_all, __pyx_t_1) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 14, __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">&#xA0;<span class="">015</span>: 'Event',</pre>
<pre class="cython line score-0">&#xA0;<span class="">016</span>: 'AsyncResult',</pre>
<pre class="cython line score-0">&#xA0;<span class="">017</span>: ]</pre>
<pre class="cython line score-0">&#xA0;<span class="">018</span>: </pre>
<pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">019</span>: def _get_linkable():</pre>
<pre class='cython code score-20 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_1_get_linkable(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event__get_linkable[] = "_get_linkable()";
static PyMethodDef __pyx_mdef_6gevent_6_event_1_get_linkable = {"_get_linkable", (PyCFunction)__pyx_pw_6gevent_6_event_1_get_linkable, METH_NOARGS, __pyx_doc_6gevent_6_event__get_linkable};
static PyObject *__pyx_pw_6gevent_6_event_1_get_linkable(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("_get_linkable (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event__get_linkable(__pyx_self);
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event__get_linkable(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_v_x = NULL;
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("_get_linkable", 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._event._get_linkable", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_x);
<span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
/* … */
__pyx_tuple__2 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_x);<span class='error_goto'> if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 19, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__2);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__2);
/* … */
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_1_get_linkable, 0, __pyx_n_s_get_linkable, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__3));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __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_linkable, __pyx_t_1) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 19, __pyx_L1_error)</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
__pyx_codeobj__3 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_get_linkable, 19, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 19, __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="">020</span>: x = __import__('gevent._abstract_linkable')</pre>
<pre class='cython code score-7 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin___import__, __pyx_tuple_, NULL);<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);
__pyx_v_x = __pyx_t_1;
__pyx_t_1 = 0;
/* … */
__pyx_tuple_ = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_gevent__abstract_linkable);<span class='error_goto'> if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 20, __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-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">021</span>: return x._abstract_linkable.AbstractLinkable</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>(__pyx_v_x, __pyx_n_s_abstract_linkable);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __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_AbstractLinkable);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __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-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">022</span>: locals()['AbstractLinkable'] = _get_linkable()</pre>
<pre class='cython code score-14 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_get_linkable);<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);
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_1);<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_Globals</span>();<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);
if (unlikely(<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_1, __pyx_n_s_AbstractLinkable, __pyx_t_2) &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 22, __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-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">023</span>: del _get_linkable</pre>
<pre class='cython code score-2 '> if (<span class='pyx_c_api'>__Pyx_PyObject_DelAttrStr</span>(__pyx_m, __pyx_n_s_get_linkable) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 23, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">024</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">025</span>: # Sadly, something about the way we have to "import" AbstractLinkable</pre>
<pre class="cython line score-0">&#xA0;<span class="">026</span>: # breaks pylint's inference of slots, even though they're declared</pre>
<pre class="cython line score-0">&#xA0;<span class="">027</span>: # right here.</pre>
<pre class="cython line score-0">&#xA0;<span class="">028</span>: # pylint:disable=assigning-non-slot</pre>
<pre class="cython line score-0">&#xA0;<span class="">029</span>: </pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">030</span>: class Event(AbstractLinkable): # pylint:disable=undefined-variable</pre>
<pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_event_Event {
struct __pyx_vtabstruct_6gevent_19__abstract_linkable_AbstractLinkable __pyx_base;
};
static struct __pyx_vtabstruct_6gevent_6_event_Event *__pyx_vtabptr_6gevent_6_event_Event;
</pre><pre class="cython line score-0">&#xA0;<span class="">031</span>: """A synchronization primitive that allows one greenlet to wake up one or more others.</pre>
<pre class="cython line score-0">&#xA0;<span class="">032</span>: It has the same interface as :class:`threading.Event` but works across greenlets.</pre>
<pre class="cython line score-0">&#xA0;<span class="">033</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">034</span>: An event object manages an internal flag that can be set to true with the</pre>
<pre class="cython line score-0">&#xA0;<span class="">035</span>: :meth:`set` method and reset to false with the :meth:`clear` method. The :meth:`wait` method</pre>
<pre class="cython line score-0">&#xA0;<span class="">036</span>: blocks until the flag is true.</pre>
<pre class="cython line score-0">&#xA0;<span class="">037</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">038</span>: .. note::</pre>
<pre class="cython line score-0">&#xA0;<span class="">039</span>: The order and timing in which waiting greenlets are awakened is not determined.</pre>
<pre class="cython line score-0">&#xA0;<span class="">040</span>: As an implementation note, in gevent 1.1 and 1.0, waiting greenlets are awakened in a</pre>
<pre class="cython line score-0">&#xA0;<span class="">041</span>: undetermined order sometime *after* the current greenlet yields to the event loop. Other greenlets</pre>
<pre class="cython line score-0">&#xA0;<span class="">042</span>: (those not waiting to be awakened) may run between the current greenlet yielding and</pre>
<pre class="cython line score-0">&#xA0;<span class="">043</span>: the waiting greenlets being awakened. These details may change in the future.</pre>
<pre class="cython line score-0">&#xA0;<span class="">044</span>: """</pre>
<pre class="cython line score-0">&#xA0;<span class="">045</span>: </pre>
<pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">046</span>: __slots__ = ('_flag',)</pre>
<pre class='cython code score-15 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_event_Event-&gt;tp_dict, __pyx_n_s_slots, __pyx_tuple__4) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L1_error)</span>
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_event_Event);
/* … */
__pyx_tuple__4 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_flag);<span class='error_goto'> if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 46, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__4);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__4);
</pre><pre class="cython line score-0">&#xA0;<span class="">047</span>: </pre>
<pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">048</span>: def __init__(self):</pre>
<pre class='cython code score-16 '>/* Python wrapper */
static int __pyx_pw_6gevent_6_event_5Event_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_6_event_5Event_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) &gt; 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) &amp;&amp; unlikely(<span class='py_c_api'>PyDict_Size</span>(__pyx_kwds) &gt; 0) &amp;&amp; unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "__init__", 0))) return -1;
__pyx_r = __pyx_pf_6gevent_6_event_5Event___init__(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static int __pyx_pf_6gevent_6_event_5Event___init__(struct __pyx_obj_6gevent_6_event_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;
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._event.Event.__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-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">049</span>: super(Event, self).__init__()</pre>
<pre class='cython code score-32 '> __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_ptype_6gevent_6_event_Event));
<span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_ptype_6gevent_6_event_Event));
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6gevent_6_event_Event));
<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_2, 1, ((PyObject *)__pyx_v_self));
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_super, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __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_init);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __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 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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, 49, __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" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">050</span>: self._flag = False</pre>
<pre class='cython code score-0 '> __pyx_v_self-&gt;_flag = 0;
</pre><pre class="cython line score-0">&#xA0;<span class="">051</span>: </pre>
<pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">052</span>: def __str__(self):</pre>
<pre class='cython code score-7 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_5Event_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_6_event_5Event_3__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_6_event_5Event_2__str__(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_5Event_2__str__(struct __pyx_obj_6gevent_6_event_Event *__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_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
<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._event.Event.__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-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">053</span>: return '&lt;%s %s _links[%s]&gt;' % (self.__class__.__name__, (self._flag and 'set') or 'clear',</pre>
<pre class='cython code score-21 '> <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_class);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __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, 53, __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 (!__pyx_v_self-&gt;_flag) {
goto __pyx_L4_next_or;
} else {
}
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_n_s_set); if (unlikely(__pyx_t_3 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 53, __pyx_L1_error)</span>
if (!__pyx_t_3) {
} else {
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_set);
__pyx_t_1 = __pyx_n_s_set;
goto __pyx_L3_bool_binop_done;
}
__pyx_L4_next_or:;
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_clear);
__pyx_t_1 = __pyx_n_s_clear;
__pyx_L3_bool_binop_done:;
/* … */
__pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_t_2);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1, __pyx_t_1);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 2, __pyx_t_4);
__pyx_t_2 = 0;
__pyx_t_1 = 0;
__pyx_t_4 = 0;
__pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_s_s__links_s, __pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __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_r = __pyx_t_4;
__pyx_t_4 = 0;
goto __pyx_L0;
</pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">054</span>: self.linkcount())</pre>
<pre class='cython code score-18 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_linkcount);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
__pyx_t_6 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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) ? <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, 54, __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;
</pre><pre class="cython line score-0">&#xA0;<span class="">055</span>: </pre>
<pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">056</span>: def is_set(self):</pre>
<pre class='cython code score-23 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_5Event_5is_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_5Event_4is_set[] = "Event.is_set(self)\nReturn true if and only if the internal flag is true.";
static PyMethodDef __pyx_mdef_6gevent_6_event_5Event_5is_set = {"is_set", (PyCFunction)__pyx_pw_6gevent_6_event_5Event_5is_set, METH_NOARGS, __pyx_doc_6gevent_6_event_5Event_4is_set};
static PyObject *__pyx_pw_6gevent_6_event_5Event_5is_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("is_set (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_5Event_4is_set(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_5Event_4is_set(struct __pyx_obj_6gevent_6_event_Event *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("is_set", 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._event.Event.is_set", __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__5 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 56, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__5);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__5);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_5Event_5is_set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Event_is_set, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__6));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __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_6_event_Event-&gt;tp_dict, __pyx_n_s_is_set, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 56, __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_6_event_Event);
__pyx_codeobj__6 = (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__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_is_set, 56, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 56, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">057</span>: """Return true if and only if the internal flag is true."""</pre>
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">058</span>: return self._flag</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_PyBool_FromLong</span>(__pyx_v_self-&gt;_flag);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __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">&#xA0;<span class="">059</span>: </pre>
<pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">060</span>: def isSet(self):</pre>
<pre class='cython code score-23 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_5Event_7isSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_5Event_6isSet[] = "Event.isSet(self)";
static PyMethodDef __pyx_mdef_6gevent_6_event_5Event_7isSet = {"isSet", (PyCFunction)__pyx_pw_6gevent_6_event_5Event_7isSet, METH_NOARGS, __pyx_doc_6gevent_6_event_5Event_6isSet};
static PyObject *__pyx_pw_6gevent_6_event_5Event_7isSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("isSet (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_5Event_6isSet(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_5Event_6isSet(struct __pyx_obj_6gevent_6_event_Event *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("isSet", 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._event.Event.isSet", __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__7 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 60, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__7);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__7);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_5Event_7isSet, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Event_isSet, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__8));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __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_6_event_Event-&gt;tp_dict, __pyx_n_s_isSet, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 60, __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_6_event_Event);
__pyx_codeobj__8 = (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__7, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_isSet, 60, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 60, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">061</span>: # makes it a better drop-in replacement for threading.Event</pre>
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">062</span>: return self._flag</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_PyBool_FromLong</span>(__pyx_v_self-&gt;_flag);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __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">&#xA0;<span class="">063</span>: </pre>
<pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">064</span>: def ready(self):</pre>
<pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_6_event_5Event_9ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_6gevent_6_event_5Event_ready(struct __pyx_obj_6gevent_6_event_Event *__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))-&gt;tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_flags &amp; (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
#if CYTHON_USE_DICT_VERSIONS &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
if (likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict &amp;&amp; tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) &amp;&amp; (!Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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))-&gt;tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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, 64, __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_6_event_5Event_9ready)) {
<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 &amp;&amp; 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, 64, __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) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 64, __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 &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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 &amp;&amp; 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._event.Event.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_6_event_5Event_9ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_5Event_8ready[] = "Event.ready(self) -&gt; bool";
static PyMethodDef __pyx_mdef_6gevent_6_event_5Event_9ready = {"ready", (PyCFunction)__pyx_pw_6gevent_6_event_5Event_9ready, METH_NOARGS, __pyx_doc_6gevent_6_event_5Event_8ready};
static PyObject *__pyx_pw_6gevent_6_event_5Event_9ready(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_6_event_5Event_8ready(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_5Event_8ready(struct __pyx_obj_6gevent_6_event_Event *__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_6_event_5Event_ready(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __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._event.Event.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__9 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 64, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__9);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__9);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_5Event_9ready, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Event_ready, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__10));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __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_6_event_Event-&gt;tp_dict, __pyx_n_s_ready, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 64, __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_6_event_Event);
__pyx_codeobj__10 = (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__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_ready, 64, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 64, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">065</span>: # makes it compatible with AsyncResult and Greenlet (for</pre>
<pre class="cython line score-0">&#xA0;<span class="">066</span>: # example in wait())</pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">067</span>: return self._flag</pre>
<pre class='cython code score-0 '> __pyx_r = __pyx_v_self-&gt;_flag;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">068</span>: </pre>
<pre class="cython line score-24" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">069</span>: def set(self):</pre>
<pre class='cython code score-24 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_5Event_11set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_5Event_10set[] = "Event.set(self)\n\n Set the internal flag to true.\n\n All greenlets waiting for it to become true are awakened in\n some order at some time in the future. Greenlets that call\n :meth:`wait` once the flag is true will not block at all\n (until :meth:`clear` is called).\n ";
static PyMethodDef __pyx_mdef_6gevent_6_event_5Event_11set = {"set", (PyCFunction)__pyx_pw_6gevent_6_event_5Event_11set, METH_NOARGS, __pyx_doc_6gevent_6_event_5Event_10set};
static PyObject *__pyx_pw_6gevent_6_event_5Event_11set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("set (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_5Event_10set(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_5Event_10set(struct __pyx_obj_6gevent_6_event_Event *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("set", 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_c_api'>__Pyx_AddTraceback</span>("gevent._event.Event.set", __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__11 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 69, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__11);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__11);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_5Event_11set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Event_set, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__12));<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);
if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_event_Event-&gt;tp_dict, __pyx_n_s_set, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 69, __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_6_event_Event);
__pyx_codeobj__12 = (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__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_set, 69, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 69, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">070</span>: """</pre>
<pre class="cython line score-0">&#xA0;<span class="">071</span>: Set the internal flag to true.</pre>
<pre class="cython line score-0">&#xA0;<span class="">072</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">073</span>: All greenlets waiting for it to become true are awakened in</pre>
<pre class="cython line score-0">&#xA0;<span class="">074</span>: some order at some time in the future. Greenlets that call</pre>
<pre class="cython line score-0">&#xA0;<span class="">075</span>: :meth:`wait` once the flag is true will not block at all</pre>
<pre class="cython line score-0">&#xA0;<span class="">076</span>: (until :meth:`clear` is called).</pre>
<pre class="cython line score-0">&#xA0;<span class="">077</span>: """</pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">078</span>: self._flag = True</pre>
<pre class='cython code score-0 '> __pyx_v_self-&gt;_flag = 1;
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">079</span>: self._check_and_notify()</pre>
<pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_event_Event *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;__pyx_base._check_and_notify(((struct __pyx_obj_6gevent_19__abstract_linkable_AbstractLinkable *)__pyx_v_self));<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);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
</pre><pre class="cython line score-0">&#xA0;<span class="">080</span>: </pre>
<pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">081</span>: def clear(self):</pre>
<pre class='cython code score-21 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_5Event_13clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_5Event_12clear[] = "Event.clear(self)\n\n Reset the internal flag to false.\n\n Subsequently, threads calling :meth:`wait` will block until\n :meth:`set` is called to set the internal flag to true again.\n ";
static PyMethodDef __pyx_mdef_6gevent_6_event_5Event_13clear = {"clear", (PyCFunction)__pyx_pw_6gevent_6_event_5Event_13clear, METH_NOARGS, __pyx_doc_6gevent_6_event_5Event_12clear};
static PyObject *__pyx_pw_6gevent_6_event_5Event_13clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("clear (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_5Event_12clear(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_5Event_12clear(struct __pyx_obj_6gevent_6_event_Event *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("clear", 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;
}
/* … */
__pyx_tuple__13 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 81, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__13);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__13);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_5Event_13clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Event_clear, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__14));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __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_6_event_Event-&gt;tp_dict, __pyx_n_s_clear, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 81, __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_6_event_Event);
__pyx_codeobj__14 = (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__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_clear, 81, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 81, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">082</span>: """</pre>
<pre class="cython line score-0">&#xA0;<span class="">083</span>: Reset the internal flag to false.</pre>
<pre class="cython line score-0">&#xA0;<span class="">084</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">085</span>: Subsequently, threads calling :meth:`wait` will block until</pre>
<pre class="cython line score-0">&#xA0;<span class="">086</span>: :meth:`set` is called to set the internal flag to true again.</pre>
<pre class="cython line score-0">&#xA0;<span class="">087</span>: """</pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">088</span>: self._flag = False</pre>
<pre class='cython code score-0 '> __pyx_v_self-&gt;_flag = 0;
</pre><pre class="cython line score-0">&#xA0;<span class="">089</span>: </pre>
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">090</span>: def _wait_return_value(self, waited, wait_success):</pre>
<pre class='cython code score-3 '>static PyObject *__pyx_f_6gevent_6_event_5Event__wait_return_value(struct __pyx_obj_6gevent_6_event_Event *__pyx_v_self, PyObject *__pyx_v_waited, PyObject *__pyx_v_wait_success) {
int __pyx_v_flag;
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("_wait_return_value", 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._event.Event._wait_return_value", __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">&#xA0;<span class="">091</span>: # To avoid the race condition outlined in http://bugs.python.org/issue13502,</pre>
<pre class="cython line score-0">&#xA0;<span class="">092</span>: # if we had to wait, then we need to return whether or not</pre>
<pre class="cython line score-0">&#xA0;<span class="">093</span>: # the condition got changed. Otherwise we simply echo</pre>
<pre class="cython line score-0">&#xA0;<span class="">094</span>: # the current state of the flag (which should be true)</pre>
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">095</span>: if not waited:</pre>
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_waited); if (unlikely(__pyx_t_1 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 95, __pyx_L1_error)</span>
__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="">096</span>: flag = self._flag</pre>
<pre class='cython code score-0 '> __pyx_t_2 = __pyx_v_self-&gt;_flag;
__pyx_v_flag = __pyx_t_2;
</pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">097</span>: assert flag, "if we didn't wait we should already be set"</pre>
<pre class='cython code score-5 '> #ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
if (unlikely(!(__pyx_v_flag != 0))) {
<span class='py_c_api'>PyErr_SetObject</span>(PyExc_AssertionError, __pyx_kp_s_if_we_didn_t_wait_we_should_alre);
<span class='error_goto'>__PYX_ERR(0, 97, __pyx_L1_error)</span>
}
}
#endif
</pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">098</span>: return flag</pre>
<pre class='cython code score-3 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyBool_FromLong</span>(__pyx_v_flag);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">099</span>: </pre>
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">100</span>: return wait_success</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_wait_success);
__pyx_r = __pyx_v_wait_success;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">101</span>: </pre>
<pre class="cython line score-41" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">102</span>: def wait(self, timeout=None):</pre>
<pre class='cython code score-41 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_5Event_15wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6gevent_6_event_5Event_14wait[] = "Event.wait(self, timeout=None)\n\n Block until the internal flag is true.\n\n If the internal flag is true on entry, return immediately. Otherwise,\n block until another thread (greenlet) calls :meth:`set` to set the flag to true,\n or until the optional timeout occurs.\n\n When the *timeout* argument is present and not ``None``, it should be a\n floating point number specifying a timeout for the operation in seconds\n (or fractions thereof).\n\n :return: This method returns true if and only if the internal flag has been set to\n true, either before the wait call or after the wait starts, so it will\n always return ``True`` except if a timeout is given and the operation\n times out.\n\n .. versionchanged:: 1.1\n The return value represents the flag during the elapsed wait, not\n just after it elapses. This solves a race condition if one greenlet\n sets and then clears the flag without switching, while other greenlets\n are waiting. When the waiters wake up, this will return True; previously,\n they would still wake up, but the return value would be False. This is most\n noticeable when the *timeout* is present.\n ";
static PyMethodDef __pyx_mdef_6gevent_6_event_5Event_15wait = {"wait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_event_5Event_15wait, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_event_5Event_14wait};
static PyObject *__pyx_pw_6gevent_6_event_5Event_15wait(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>("wait (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__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 &gt; 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 &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 102, __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>("wait", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 102, __pyx_L3_error)</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.Event.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_6gevent_6_event_5Event_14wait(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self), __pyx_v_timeout);
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_5Event_14wait(struct __pyx_obj_6gevent_6_event_Event *__pyx_v_self, PyObject *__pyx_v_timeout) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("wait", 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._event.Event.wait", __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__15 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_timeout);<span class='error_goto'> if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 102, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__15);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__15);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_5Event_15wait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Event_wait, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__16));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __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_6_event_Event-&gt;tp_dict, __pyx_n_s_wait, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 102, __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_6_event_Event);
__pyx_codeobj__16 = (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__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_wait, 102, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 102, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">103</span>: """</pre>
<pre class="cython line score-0">&#xA0;<span class="">104</span>: Block until the internal flag is true.</pre>
<pre class="cython line score-0">&#xA0;<span class="">105</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">106</span>: If the internal flag is true on entry, return immediately. Otherwise,</pre>
<pre class="cython line score-0">&#xA0;<span class="">107</span>: block until another thread (greenlet) calls :meth:`set` to set the flag to true,</pre>
<pre class="cython line score-0">&#xA0;<span class="">108</span>: or until the optional timeout occurs.</pre>
<pre class="cython line score-0">&#xA0;<span class="">109</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">110</span>: When the *timeout* argument is present and not ``None``, it should be a</pre>
<pre class="cython line score-0">&#xA0;<span class="">111</span>: floating point number specifying a timeout for the operation in seconds</pre>
<pre class="cython line score-0">&#xA0;<span class="">112</span>: (or fractions thereof).</pre>
<pre class="cython line score-0">&#xA0;<span class="">113</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">114</span>: :return: This method returns true if and only if the internal flag has been set to</pre>
<pre class="cython line score-0">&#xA0;<span class="">115</span>: true, either before the wait call or after the wait starts, so it will</pre>
<pre class="cython line score-0">&#xA0;<span class="">116</span>: always return ``True`` except if a timeout is given and the operation</pre>
<pre class="cython line score-0">&#xA0;<span class="">117</span>: times out.</pre>
<pre class="cython line score-0">&#xA0;<span class="">118</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">119</span>: .. versionchanged:: 1.1</pre>
<pre class="cython line score-0">&#xA0;<span class="">120</span>: The return value represents the flag during the elapsed wait, not</pre>
<pre class="cython line score-0">&#xA0;<span class="">121</span>: just after it elapses. This solves a race condition if one greenlet</pre>
<pre class="cython line score-0">&#xA0;<span class="">122</span>: sets and then clears the flag without switching, while other greenlets</pre>
<pre class="cython line score-0">&#xA0;<span class="">123</span>: are waiting. When the waiters wake up, this will return True; previously,</pre>
<pre class="cython line score-0">&#xA0;<span class="">124</span>: they would still wake up, but the return value would be False. This is most</pre>
<pre class="cython line score-0">&#xA0;<span class="">125</span>: noticeable when the *timeout* is present.</pre>
<pre class="cython line score-0">&#xA0;<span class="">126</span>: """</pre>
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">127</span>: return self._wait(timeout)</pre>
<pre class='cython code score-1 '> <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 = ((struct __pyx_vtabstruct_6gevent_6_event_Event *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;__pyx_base._wait(((struct __pyx_obj_6gevent_19__abstract_linkable_AbstractLinkable *)__pyx_v_self), &amp;__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __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">&#xA0;<span class="">128</span>: </pre>
<pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">129</span>: def _reset_internal_locks(self): # pragma: no cover</pre>
<pre class='cython code score-21 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_5Event_17_reset_internal_locks(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_5Event_16_reset_internal_locks[] = "Event._reset_internal_locks(self)";
static PyMethodDef __pyx_mdef_6gevent_6_event_5Event_17_reset_internal_locks = {"_reset_internal_locks", (PyCFunction)__pyx_pw_6gevent_6_event_5Event_17_reset_internal_locks, METH_NOARGS, __pyx_doc_6gevent_6_event_5Event_16_reset_internal_locks};
static PyObject *__pyx_pw_6gevent_6_event_5Event_17_reset_internal_locks(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("_reset_internal_locks (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_5Event_16_reset_internal_locks(((struct __pyx_obj_6gevent_6_event_Event *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_5Event_16_reset_internal_locks(CYTHON_UNUSED struct __pyx_obj_6gevent_6_event_Event *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("_reset_internal_locks", 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;
}
/* … */
__pyx_tuple__17 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 129, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__17);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__17);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_5Event_17_reset_internal_locks, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Event__reset_internal_locks, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__18));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __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_6_event_Event-&gt;tp_dict, __pyx_n_s_reset_internal_locks, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 129, __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_6_event_Event);
__pyx_codeobj__18 = (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__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_reset_internal_locks, 129, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 129, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">130</span>: # for compatibility with threading.Event</pre>
<pre class="cython line score-0">&#xA0;<span class="">131</span>: # Exception AttributeError: AttributeError("'Event' object has no attribute '_reset_internal_locks'",)</pre>
<pre class="cython line score-0">&#xA0;<span class="">132</span>: # in &lt;module 'threading' from '/usr/lib/python2.7/threading.pyc'&gt; ignored</pre>
<pre class="cython line score-0">&#xA0;<span class="">133</span>: pass</pre>
<pre class="cython line score-0">&#xA0;<span class="">134</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">135</span>: </pre>
<pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">136</span>: class AsyncResult(AbstractLinkable): # pylint:disable=undefined-variable</pre>
<pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_event_AsyncResult {
struct __pyx_vtabstruct_6gevent_19__abstract_linkable_AbstractLinkable __pyx_base;
PyObject *(*get)(struct __pyx_obj_6gevent_6_event_AsyncResult *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_event_11AsyncResult_get *__pyx_optional_args);
int (*successful)(struct __pyx_obj_6gevent_6_event_AsyncResult *, int __pyx_skip_dispatch);
PyObject *(*wait)(struct __pyx_obj_6gevent_6_event_AsyncResult *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_event_11AsyncResult_wait *__pyx_optional_args);
int (*done)(struct __pyx_obj_6gevent_6_event_AsyncResult *, int __pyx_skip_dispatch);
int (*cancel)(struct __pyx_obj_6gevent_6_event_AsyncResult *, int __pyx_skip_dispatch);
int (*cancelled)(struct __pyx_obj_6gevent_6_event_AsyncResult *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_6gevent_6_event_AsyncResult *__pyx_vtabptr_6gevent_6_event_AsyncResult;
</pre><pre class="cython line score-0">&#xA0;<span class="">137</span>: """A one-time event that stores a value or an exception.</pre>
<pre class="cython line score-0">&#xA0;<span class="">138</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">139</span>: Like :class:`Event` it wakes up all the waiters when :meth:`set` or :meth:`set_exception`</pre>
<pre class="cython line score-0">&#xA0;<span class="">140</span>: is called. Waiters may receive the passed value or exception by calling :meth:`get`</pre>
<pre class="cython line score-0">&#xA0;<span class="">141</span>: instead of :meth:`wait`. An :class:`AsyncResult` instance cannot be reset.</pre>
<pre class="cython line score-0">&#xA0;<span class="">142</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">143</span>: To pass a value call :meth:`set`. Calls to :meth:`get` (those that are currently blocking as well as</pre>
<pre class="cython line score-0">&#xA0;<span class="">144</span>: those made in the future) will return the value:</pre>
<pre class="cython line score-0">&#xA0;<span class="">145</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">146</span>: &gt;&gt;&gt; result = AsyncResult()</pre>
<pre class="cython line score-0">&#xA0;<span class="">147</span>: &gt;&gt;&gt; result.set(100)</pre>
<pre class="cython line score-0">&#xA0;<span class="">148</span>: &gt;&gt;&gt; result.get()</pre>
<pre class="cython line score-0">&#xA0;<span class="">149</span>: 100</pre>
<pre class="cython line score-0">&#xA0;<span class="">150</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">151</span>: To pass an exception call :meth:`set_exception`. This will cause :meth:`get` to raise that exception:</pre>
<pre class="cython line score-0">&#xA0;<span class="">152</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">153</span>: &gt;&gt;&gt; result = AsyncResult()</pre>
<pre class="cython line score-0">&#xA0;<span class="">154</span>: &gt;&gt;&gt; result.set_exception(RuntimeError('failure'))</pre>
<pre class="cython line score-0">&#xA0;<span class="">155</span>: &gt;&gt;&gt; result.get()</pre>
<pre class="cython line score-0">&#xA0;<span class="">156</span>: Traceback (most recent call last):</pre>
<pre class="cython line score-0">&#xA0;<span class="">157</span>: ...</pre>
<pre class="cython line score-0">&#xA0;<span class="">158</span>: RuntimeError: failure</pre>
<pre class="cython line score-0">&#xA0;<span class="">159</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">160</span>: :class:`AsyncResult` implements :meth:`__call__` and thus can be used as :meth:`link` target:</pre>
<pre class="cython line score-0">&#xA0;<span class="">161</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">162</span>: &gt;&gt;&gt; import gevent</pre>
<pre class="cython line score-0">&#xA0;<span class="">163</span>: &gt;&gt;&gt; result = AsyncResult()</pre>
<pre class="cython line score-0">&#xA0;<span class="">164</span>: &gt;&gt;&gt; gevent.spawn(lambda : 1/0).link(result)</pre>
<pre class="cython line score-0">&#xA0;<span class="">165</span>: &gt;&gt;&gt; try:</pre>
<pre class="cython line score-0">&#xA0;<span class="">166</span>: ... result.get()</pre>
<pre class="cython line score-0">&#xA0;<span class="">167</span>: ... except ZeroDivisionError:</pre>
<pre class="cython line score-0">&#xA0;<span class="">168</span>: ... print('ZeroDivisionError')</pre>
<pre class="cython line score-0">&#xA0;<span class="">169</span>: ZeroDivisionError</pre>
<pre class="cython line score-0">&#xA0;<span class="">170</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">171</span>: .. note::</pre>
<pre class="cython line score-0">&#xA0;<span class="">172</span>: The order and timing in which waiting greenlets are awakened is not determined.</pre>
<pre class="cython line score-0">&#xA0;<span class="">173</span>: As an implementation note, in gevent 1.1 and 1.0, waiting greenlets are awakened in a</pre>
<pre class="cython line score-0">&#xA0;<span class="">174</span>: undetermined order sometime *after* the current greenlet yields to the event loop. Other greenlets</pre>
<pre class="cython line score-0">&#xA0;<span class="">175</span>: (those not waiting to be awakened) may run between the current greenlet yielding and</pre>
<pre class="cython line score-0">&#xA0;<span class="">176</span>: the waiting greenlets being awakened. These details may change in the future.</pre>
<pre class="cython line score-0">&#xA0;<span class="">177</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">178</span>: .. versionchanged:: 1.1</pre>
<pre class="cython line score-0">&#xA0;<span class="">179</span>: The exact order in which waiting greenlets are awakened is not the same</pre>
<pre class="cython line score-0">&#xA0;<span class="">180</span>: as in 1.0.</pre>
<pre class="cython line score-0">&#xA0;<span class="">181</span>: .. versionchanged:: 1.1</pre>
<pre class="cython line score-0">&#xA0;<span class="">182</span>: Callbacks :meth:`linked &lt;rawlink&gt;` to this object are required to be hashable, and duplicates are</pre>
<pre class="cython line score-0">&#xA0;<span class="">183</span>: merged.</pre>
<pre class="cython line score-0">&#xA0;<span class="">184</span>: """</pre>
<pre class="cython line score-0">&#xA0;<span class="">185</span>: </pre>
<pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">186</span>: __slots__ = ('_value', '_exc_info', '_imap_task_index')</pre>
<pre class='cython code score-15 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_slots, __pyx_tuple__19) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 186, __pyx_L1_error)</span>
<span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_event_AsyncResult);
/* … */
__pyx_tuple__19 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_value_2, __pyx_n_s_exc_info_2, __pyx_n_s_imap_task_index);<span class='error_goto'> if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 186, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__19);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__19);
</pre><pre class="cython line score-0">&#xA0;<span class="">187</span>: </pre>
<pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">188</span>: def __init__(self):</pre>
<pre class='cython code score-16 '>/* Python wrapper */
static int __pyx_pw_6gevent_6_event_11AsyncResult_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6gevent_6_event_11AsyncResult_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) &gt; 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) &amp;&amp; unlikely(<span class='py_c_api'>PyDict_Size</span>(__pyx_kwds) &gt; 0) &amp;&amp; unlikely(!<span class='pyx_c_api'>__Pyx_CheckKeywordStrings</span>(__pyx_kwds, "__init__", 0))) return -1;
__pyx_r = __pyx_pf_6gevent_6_event_11AsyncResult___init__(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static int __pyx_pf_6gevent_6_event_11AsyncResult___init__(struct __pyx_obj_6gevent_6_event_AsyncResult *__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;
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._event.AsyncResult.__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-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">189</span>: super(AsyncResult, self).__init__()</pre>
<pre class='cython code score-32 '> __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_ptype_6gevent_6_event_AsyncResult));
<span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_ptype_6gevent_6_event_AsyncResult));
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6gevent_6_event_AsyncResult));
<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_2, 1, ((PyObject *)__pyx_v_self));
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_super, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __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_init);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __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 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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, 189, __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-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">190</span>: self._value = _NONE</pre>
<pre class='cython code score-3 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __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-&gt;_value);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self-&gt;_value);
__pyx_v_self-&gt;_value = __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="">191</span>: self._exc_info = ()</pre>
<pre class='cython code score-2 '> <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-&gt;_exc_info);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self-&gt;_exc_info);
__pyx_v_self-&gt;_exc_info = __pyx_empty_tuple;
</pre><pre class="cython line score-0">&#xA0;<span class="">192</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">193</span>: @property</pre>
<pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">194</span>: def _exception(self):</pre>
<pre class='cython code score-4 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_10_exception_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_10_exception_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_6_event_11AsyncResult_10_exception___get__(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_10_exception___get__(struct __pyx_obj_6gevent_6_event_AsyncResult *__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._event.AsyncResult._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-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">195</span>: return self._exc_info[1] if self._exc_info else _NONE</pre>
<pre class='cython code score-11 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_2 = (__pyx_v_self-&gt;_exc_info != Py_None)&amp;&amp;(<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_self-&gt;_exc_info) != 0);
if (__pyx_t_2) {
if (unlikely(__pyx_v_self-&gt;_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, 195, __pyx_L1_error)</span>
}
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_self-&gt;_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __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_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_1 = __pyx_t_3;
__pyx_t_3 = 0;
}
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">196</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">197</span>: @property</pre>
<pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">198</span>: def value(self):</pre>
<pre class='cython code score-4 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_5value_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_5value_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_6_event_11AsyncResult_5value___get__(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_5value___get__(struct __pyx_obj_6gevent_6_event_AsyncResult *__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._event.AsyncResult.value.__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">&#xA0;<span class="">199</span>: """</pre>
<pre class="cython line score-0">&#xA0;<span class="">200</span>: Holds the value passed to :meth:`set` if :meth:`set` was called. Otherwise,</pre>
<pre class="cython line score-0">&#xA0;<span class="">201</span>: ``None``</pre>
<pre class="cython line score-0">&#xA0;<span class="">202</span>: """</pre>
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">203</span>: return self._value if self._value is not _NONE else None</pre>
<pre class='cython code score-6 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_3 = (__pyx_v_self-&gt;_value != __pyx_t_2);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
if ((__pyx_t_3 != 0)) {
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self-&gt;_value);
__pyx_t_1 = __pyx_v_self-&gt;_value;
} 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">&#xA0;<span class="">204</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">205</span>: @property</pre>
<pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">206</span>: def exc_info(self):</pre>
<pre class='cython code score-8 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_8exc_info_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_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_6_event_11AsyncResult_8exc_info___get__(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_8exc_info___get__(struct __pyx_obj_6gevent_6_event_AsyncResult *__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_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_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7);
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.exc_info.__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">&#xA0;<span class="">207</span>: """</pre>
<pre class="cython line score-0">&#xA0;<span class="">208</span>: The three-tuple of exception information if :meth:`set_exception` was called.</pre>
<pre class="cython line score-0">&#xA0;<span class="">209</span>: """</pre>
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">210</span>: if self._exc_info:</pre>
<pre class='cython code score-1 '> __pyx_t_1 = (__pyx_v_self-&gt;_exc_info != Py_None)&amp;&amp;(<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_self-&gt;_exc_info) != 0);
if (__pyx_t_1) {
/* … */
}
</pre><pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">211</span>: return (self._exc_info[0], self._exc_info[1], load_traceback(self._exc_info[2]))</pre>
<pre class='cython code score-46 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
if (unlikely(__pyx_v_self-&gt;_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, 211, __pyx_L1_error)</span>
}
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_self-&gt;_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
if (unlikely(__pyx_v_self-&gt;_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, 211, __pyx_L1_error)</span>
}
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_self-&gt;_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
if (unlikely(__pyx_v_self-&gt;_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, 211, __pyx_L1_error)</span>
}
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_self-&gt;_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_6_event_load_traceback);
__pyx_t_6 = __pyx_v_6gevent_6_event_load_traceback; __pyx_t_7 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_6, __pyx_t_5);
<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_5); __pyx_t_5 = 0;
if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 211, __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, 211, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_2);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1, __pyx_t_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2, __pyx_t_4);
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
goto __pyx_L0;
</pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">212</span>: return ()</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_empty_tuple);
__pyx_r = __pyx_empty_tuple;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">213</span>: </pre>
<pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">214</span>: def __str__(self):</pre>
<pre class='cython code score-6 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_3__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_3__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_6_event_11AsyncResult_2__str__(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_2__str__(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self) {
PyObject *__pyx_v_result = NULL;
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_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.__str__", __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;
}
</pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">215</span>: result = '&lt;%s ' % (self.__class__.__name__, )</pre>
<pre class='cython code score-14 '> __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, 215, __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, 215, __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'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __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, 215, __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_result = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
</pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">216</span>: if self.value is not None or self._exception is not _NONE:</pre>
<pre class='cython code score-9 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_value);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_4 = (__pyx_t_2 != Py_None);
<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_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_exception);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_t_5 = (__pyx_t_2 != __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;
__pyx_t_4 = (__pyx_t_5 != 0);
__pyx_t_3 = __pyx_t_4;
__pyx_L4_bool_binop_done:;
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="">217</span>: result += 'value=%r ' % self.value</pre>
<pre class='cython code score-12 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_value);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_FormatSafe</span>(__pyx_kp_s_value_r, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __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_InPlaceAdd</span>(__pyx_v_result, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __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_SET</span>(__pyx_v_result, ((PyObject*)__pyx_t_1));
__pyx_t_1 = 0;
</pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">218</span>: if self._exception is not None and self._exception is not _NONE:</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_exception);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __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_5 = (__pyx_t_4 != 0);
if (__pyx_t_5) {
} else {
__pyx_t_3 = __pyx_t_5;
goto __pyx_L7_bool_binop_done;
}
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_exception);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_5 = (__pyx_t_1 != __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;
__pyx_t_4 = (__pyx_t_5 != 0);
__pyx_t_3 = __pyx_t_4;
__pyx_L7_bool_binop_done:;
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="">219</span>: result += 'exception=%r ' % self._exception</pre>
<pre class='cython code score-12 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_exception);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_FormatSafe</span>(__pyx_kp_s_exception_r, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __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, 219, __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="">220</span>: if self._exception is _NONE:</pre>
<pre class='cython code score-6 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_exception);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_t_3 = (__pyx_t_2 == __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;
__pyx_t_4 = (__pyx_t_3 != 0);
if (__pyx_t_4) {
/* … */
}
</pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">221</span>: result += 'unset '</pre>
<pre class='cython code score-6 '> __pyx_t_1 = <span class='py_c_api'>PyNumber_InPlaceAdd</span>(__pyx_v_result, __pyx_kp_s_unset);<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);
<span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_result, ((PyObject*)__pyx_t_1));
__pyx_t_1 = 0;
</pre><pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">222</span>: return result + ' _links[%s]&gt;' % self.linkcount()</pre>
<pre class='cython code score-28 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_linkcount);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_6 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
__pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
<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_2, function);
}
}
__pyx_t_1 = (__pyx_t_6) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_6) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2);
<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, 222, __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_PyString_FormatSafe</span>(__pyx_kp_s_links_s, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __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_v_result, __pyx_t_2);<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_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">&#xA0;<span class="">223</span>: </pre>
<pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">224</span>: def ready(self):</pre>
<pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_5ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_6gevent_6_event_11AsyncResult_ready(struct __pyx_obj_6gevent_6_event_AsyncResult *__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))-&gt;tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_flags &amp; (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
#if CYTHON_USE_DICT_VERSIONS &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
if (likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict &amp;&amp; tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) &amp;&amp; (!Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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))-&gt;tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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, 224, __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_6_event_11AsyncResult_5ready)) {
<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 &amp;&amp; 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, 224, __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) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 224, __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 &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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 &amp;&amp; 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._event.AsyncResult.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_6_event_11AsyncResult_5ready(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_4ready[] = "AsyncResult.ready(self) -&gt; bool\nReturn true if and only if it holds a value or an exception";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_5ready = {"ready", (PyCFunction)__pyx_pw_6gevent_6_event_11AsyncResult_5ready, METH_NOARGS, __pyx_doc_6gevent_6_event_11AsyncResult_4ready};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_5ready(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_6_event_11AsyncResult_4ready(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_4ready(struct __pyx_obj_6gevent_6_event_AsyncResult *__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_6_event_11AsyncResult_ready(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __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._event.AsyncResult.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__20 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 224, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__20);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__20);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_5ready, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_ready, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__21));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_ready, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 224, __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_6_event_AsyncResult);
__pyx_codeobj__21 = (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__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_ready, 224, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 224, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">225</span>: """Return true if and only if it holds a value or an exception"""</pre>
<pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">226</span>: return self._exc_info or self._value is not _NONE</pre>
<pre class='cython code score-4 '> __pyx_t_6 = (__pyx_v_self-&gt;_exc_info != Py_None)&amp;&amp;(<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_self-&gt;_exc_info) != 0);
if (!__pyx_t_6) {
} else {
__pyx_t_5 = __pyx_t_6;
goto __pyx_L3_bool_binop_done;
}
<span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_t_6 = (__pyx_v_self-&gt;_value != __pyx_t_1);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
__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">&#xA0;<span class="">227</span>: </pre>
<pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">228</span>: def successful(self):</pre>
<pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_7successful(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_6gevent_6_event_11AsyncResult_successful(struct __pyx_obj_6gevent_6_event_AsyncResult *__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))-&gt;tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_flags &amp; (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
#if CYTHON_USE_DICT_VERSIONS &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
if (likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict &amp;&amp; tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) &amp;&amp; (!Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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))-&gt;tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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, 228, __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_6_event_11AsyncResult_7successful)) {
<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 &amp;&amp; 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, 228, __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) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 228, __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 &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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 &amp;&amp; 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._event.AsyncResult.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_6_event_11AsyncResult_7successful(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_6successful[] = "AsyncResult.successful(self) -&gt; bool\nReturn true if and only if it is ready and holds a value";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_7successful = {"successful", (PyCFunction)__pyx_pw_6gevent_6_event_11AsyncResult_7successful, METH_NOARGS, __pyx_doc_6gevent_6_event_11AsyncResult_6successful};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_7successful(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_6_event_11AsyncResult_6successful(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_6successful(struct __pyx_obj_6gevent_6_event_AsyncResult *__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_6_event_11AsyncResult_successful(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __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._event.AsyncResult.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__22 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 228, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__22);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__22);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_7successful, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_successful, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__23));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_successful, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 228, __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_6_event_AsyncResult);
__pyx_codeobj__23 = (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__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_successful, 228, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 228, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">229</span>: """Return true if and only if it is ready and holds a value"""</pre>
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">230</span>: return self._value is not _NONE</pre>
<pre class='cython code score-3 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_t_5 = (__pyx_v_self-&gt;_value != __pyx_t_1);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_5;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">231</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">232</span>: @property</pre>
<pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">233</span>: def exception(self):</pre>
<pre class='cython code score-4 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_9exception_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_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_6_event_11AsyncResult_9exception___get__(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_9exception___get__(struct __pyx_obj_6gevent_6_event_AsyncResult *__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_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_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.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">&#xA0;<span class="">234</span>: """Holds the exception instance passed to :meth:`set_exception` if :meth:`set_exception` was called.</pre>
<pre class="cython line score-0">&#xA0;<span class="">235</span>: Otherwise ``None``."""</pre>
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">236</span>: if self._exc_info:</pre>
<pre class='cython code score-1 '> __pyx_t_1 = (__pyx_v_self-&gt;_exc_info != Py_None)&amp;&amp;(<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_self-&gt;_exc_info) != 0);
if (__pyx_t_1) {
/* … */
}
</pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">237</span>: return self._exc_info[1]</pre>
<pre class='cython code score-8 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
if (unlikely(__pyx_v_self-&gt;_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, 237, __pyx_L1_error)</span>
}
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_GetItemInt_Tuple</span>(__pyx_v_self-&gt;_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __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">&#xA0;<span class="">238</span>: </pre>
<pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">239</span>: def set(self, value=None):</pre>
<pre class='cython code score-42 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_9set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_8set[] = "AsyncResult.set(self, value=None)\nStore the value and wake up any waiters.\n\n All greenlets blocking on :meth:`get` or :meth:`wait` are awakened.\n Subsequent calls to :meth:`wait` and :meth:`get` will not block at all.\n ";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_9set = {"set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_event_11AsyncResult_9set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_event_11AsyncResult_8set};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_9set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_value = 0;
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("set (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_value,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 &gt; 0) {
PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_value);
if (value) { values[0] = value; kw_args--; }
}
}
if (unlikely(kw_args &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 239, __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_value = values[0];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("set", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 239, __pyx_L3_error)</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.set", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_6gevent_6_event_11AsyncResult_8set(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self), __pyx_v_value);
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_8set(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, PyObject *__pyx_v_value) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("set", 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_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.set", __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__24 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_value);<span class='error_goto'> if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 239, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__24);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__24);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_9set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_set, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__25));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 239, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_set, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 239, __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_6_event_AsyncResult);
__pyx_codeobj__25 = (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__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_set, 239, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 239, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">240</span>: """Store the value and wake up any waiters.</pre>
<pre class="cython line score-0">&#xA0;<span class="">241</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">242</span>: All greenlets blocking on :meth:`get` or :meth:`wait` are awakened.</pre>
<pre class="cython line score-0">&#xA0;<span class="">243</span>: Subsequent calls to :meth:`wait` and :meth:`get` will not block at all.</pre>
<pre class="cython line score-0">&#xA0;<span class="">244</span>: """</pre>
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">245</span>: self._value = value</pre>
<pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_value);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_value);
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self-&gt;_value);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self-&gt;_value);
__pyx_v_self-&gt;_value = __pyx_v_value;
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">246</span>: self._check_and_notify()</pre>
<pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_event_AsyncResult *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;__pyx_base._check_and_notify(((struct __pyx_obj_6gevent_19__abstract_linkable_AbstractLinkable *)__pyx_v_self));<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);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
</pre><pre class="cython line score-0">&#xA0;<span class="">247</span>: </pre>
<pre class="cython line score-51" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">248</span>: def set_exception(self, exception, exc_info=None):</pre>
<pre class='cython code score-51 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_11set_exception(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_10set_exception[] = "AsyncResult.set_exception(self, exception, exc_info=None)\nStore the exception and wake up any waiters.\n\n All greenlets blocking on :meth:`get` or :meth:`wait` are awakened.\n Subsequent calls to :meth:`wait` and :meth:`get` will not block at all.\n\n :keyword tuple exc_info: If given, a standard three-tuple of type, value, :class:`traceback`\n as returned by :func:`sys.exc_info`. This will be used when the exception\n is re-raised to propagate the correct traceback.\n ";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_11set_exception = {"set_exception", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_event_11AsyncResult_11set_exception, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_event_11AsyncResult_10set_exception};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_11set_exception(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_exception = 0;
PyObject *__pyx_v_exc_info = 0;
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("set_exception (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__pyx_n_s_exception_2,&amp;__pyx_n_s_exc_info,0};
PyObject* values[2] = {0,0};
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 (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_exception_2)) != 0)) kw_args--;
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
if (kw_args &gt; 0) {
PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_exc_info);
if (value) { values[1] = value; kw_args--; }
}
}
if (unlikely(kw_args &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_exception") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 248, __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_exception = values[0];
__pyx_v_exc_info = values[1];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
<span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("set_exception", 0, 1, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 248, __pyx_L3_error)</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.set_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_6_event_11AsyncResult_10set_exception(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self), __pyx_v_exception, __pyx_v_exc_info);
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_10set_exception(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, PyObject *__pyx_v_exception, PyObject *__pyx_v_exc_info) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("set_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_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_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._event.AsyncResult.set_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__26 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self, __pyx_n_s_exception_2, __pyx_n_s_exc_info);<span class='error_goto'> if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 248, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__26);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__26);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_11set_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_set_exception, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__27));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_set_exception, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 248, __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_6_event_AsyncResult);
__pyx_codeobj__27 = (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__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_set_exception, 248, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 248, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">249</span>: """Store the exception and wake up any waiters.</pre>
<pre class="cython line score-0">&#xA0;<span class="">250</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">251</span>: All greenlets blocking on :meth:`get` or :meth:`wait` are awakened.</pre>
<pre class="cython line score-0">&#xA0;<span class="">252</span>: Subsequent calls to :meth:`wait` and :meth:`get` will not block at all.</pre>
<pre class="cython line score-0">&#xA0;<span class="">253</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">254</span>: :keyword tuple exc_info: If given, a standard three-tuple of type, value, :class:`traceback`</pre>
<pre class="cython line score-0">&#xA0;<span class="">255</span>: as returned by :func:`sys.exc_info`. This will be used when the exception</pre>
<pre class="cython line score-0">&#xA0;<span class="">256</span>: is re-raised to propagate the correct traceback.</pre>
<pre class="cython line score-0">&#xA0;<span class="">257</span>: """</pre>
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">258</span>: if exc_info:</pre>
<pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_exc_info); if (unlikely(__pyx_t_1 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 258, __pyx_L1_error)</span>
if (__pyx_t_1) {
/* … */
goto __pyx_L3;
}
</pre><pre class="cython line score-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">259</span>: self._exc_info = (exc_info[0], exc_info[1], dump_traceback(exc_info[2]))</pre>
<pre class='cython code score-31 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_v_exc_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_v_exc_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<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);
__pyx_t_5 = <span class='pyx_c_api'>__Pyx_GetItemInt</span>(__pyx_v_exc_info, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_6_event_dump_traceback);
__pyx_t_6 = __pyx_v_6gevent_6_event_dump_traceback; __pyx_t_7 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_6, __pyx_t_5);
<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_5); __pyx_t_5 = 0;
if (unlikely(!__pyx_t_4)) <span class='error_goto'>__PYX_ERR(0, 259, __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, 259, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_2);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1, __pyx_t_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 2, __pyx_t_4);
__pyx_t_2 = 0;
__pyx_t_3 = 0;
__pyx_t_4 = 0;
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6);
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self-&gt;_exc_info);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self-&gt;_exc_info);
__pyx_v_self-&gt;_exc_info = ((PyObject*)__pyx_t_6);
__pyx_t_6 = 0;
</pre><pre class="cython line score-0">&#xA0;<span class="">260</span>: else:</pre>
<pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">261</span>: self._exc_info = (type(exception), exception, dump_traceback(None))</pre>
<pre class='cython code score-26 '> /*else*/ {
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_6_event_dump_traceback);
__pyx_t_4 = __pyx_v_6gevent_6_event_dump_traceback; __pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; unlikely(<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_6 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, Py_None) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, Py_None);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 261, __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, 261, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)Py_TYPE(__pyx_v_exception)));
<span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)Py_TYPE(__pyx_v_exception)));
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_exception)));
<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_4, 1, __pyx_v_exception);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 2, __pyx_t_6);
__pyx_t_6 = 0;
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4);
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self-&gt;_exc_info);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self-&gt;_exc_info);
__pyx_v_self-&gt;_exc_info = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
}
__pyx_L3:;
</pre><pre class="cython line score-0">&#xA0;<span class="">262</span>: </pre>
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">263</span>: self._check_and_notify()</pre>
<pre class='cython code score-1 '> __pyx_t_4 = ((struct __pyx_vtabstruct_6gevent_6_event_AsyncResult *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;__pyx_base._check_and_notify(((struct __pyx_obj_6gevent_19__abstract_linkable_AbstractLinkable *)__pyx_v_self));<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __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">&#xA0;<span class="">264</span>: </pre>
<pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">265</span>: def _raise_exception(self):</pre>
<pre class='cython code score-25 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_13_raise_exception(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_12_raise_exception[] = "AsyncResult._raise_exception(self)";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_13_raise_exception = {"_raise_exception", (PyCFunction)__pyx_pw_6gevent_6_event_11AsyncResult_13_raise_exception, METH_NOARGS, __pyx_doc_6gevent_6_event_11AsyncResult_12_raise_exception};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_13_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_6_event_11AsyncResult_12_raise_exception(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_12_raise_exception(struct __pyx_obj_6gevent_6_event_AsyncResult *__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._event.AsyncResult._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__28 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 265, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__28);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__28);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_13_raise_exception, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult__raise_exception, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__29));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_raise_exception, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 265, __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_6_event_AsyncResult);
__pyx_codeobj__29 = (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__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_raise_exception, 265, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 265, __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="">266</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, 266, __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, 266, __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_6_event_reraise, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __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">&#xA0;<span class="">267</span>: </pre>
<pre class="cython line score-106" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">268</span>: def get(self, block=True, timeout=None):</pre>
<pre class='cython code score-106 '>static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_15get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6gevent_6_event_11AsyncResult_get(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_event_11AsyncResult_get *__pyx_optional_args) {
PyObject *__pyx_v_block = ((PyObject *)Py_True);
PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get", 0);
if (__pyx_optional_args) {
if (__pyx_optional_args-&gt;__pyx_n &gt; 0) {
__pyx_v_block = __pyx_optional_args-&gt;block;
if (__pyx_optional_args-&gt;__pyx_n &gt; 1) {
__pyx_v_timeout = __pyx_optional_args-&gt;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))-&gt;tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_flags &amp; (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
#if CYTHON_USE_DICT_VERSIONS &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
if (likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict &amp;&amp; tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) &amp;&amp; (!Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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))-&gt;tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
#endif
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __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_6_event_11AsyncResult_15get)) {
<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;
__pyx_t_5 = 0;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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[3] = {__pyx_t_4, __pyx_v_block, __pyx_v_timeout};
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __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_2);
} else
#endif
#if CYTHON_FAST_PYCCALL
if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_3)) {
PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_block, __pyx_v_timeout};
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __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_2);
} 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, 268, __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>(__pyx_v_block);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_block);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0+__pyx_t_5, __pyx_v_block);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_timeout);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_timeout);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1+__pyx_t_5, __pyx_v_timeout);
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_3, __pyx_t_6, NULL);<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);
<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;
__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 &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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 &amp;&amp; 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_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6);
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.get", __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_6_event_11AsyncResult_15get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_14get[] = "AsyncResult.get(self, block=True, timeout=None)\nReturn the stored value or raise the exception.\n\n If this instance already holds a value or an exception, return or raise it immediately.\n Otherwise, block until another greenlet calls :meth:`set` or :meth:`set_exception` or\n until the optional timeout occurs.\n\n When the *timeout* argument is present and not ``None``, it should be a\n floating point number specifying a timeout for the operation in seconds\n (or fractions thereof). If the *timeout* elapses, the *Timeout* exception will\n be raised.\n\n :keyword bool block: If set to ``False`` and this instance is not ready,\n immediately raise a :class:`Timeout` exception.\n ";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_15get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_event_11AsyncResult_15get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_event_11AsyncResult_14get};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_15get(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[] = {&amp;__pyx_n_s_block,&amp;__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 &gt; 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 &gt; 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 &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 268, __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, 268, __pyx_L3_error)</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.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_6_event_11AsyncResult_14get(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__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_6_event_11AsyncResult_14get(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get", 0);
<span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_2.__pyx_n = 2;
__pyx_t_2.block = __pyx_v_block;
__pyx_t_2.timeout = __pyx_v_timeout;
__pyx_t_1 = __pyx_vtabptr_6gevent_6_event_AsyncResult-&gt;get(__pyx_v_self, 1, &amp;__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __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._event.AsyncResult.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;
}
/* … */
__pyx_tuple__30 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self, __pyx_n_s_block, __pyx_n_s_timeout);<span class='error_goto'> if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 268, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__30);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__30);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_15get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_get, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__31));<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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_get, __pyx_t_2) &lt; 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_6_event_AsyncResult);
__pyx_codeobj__31 = (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__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_get, 268, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 268, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">269</span>: """Return the stored value or raise the exception.</pre>
<pre class="cython line score-0">&#xA0;<span class="">270</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">271</span>: If this instance already holds a value or an exception, return or raise it immediately.</pre>
<pre class="cython line score-0">&#xA0;<span class="">272</span>: Otherwise, block until another greenlet calls :meth:`set` or :meth:`set_exception` or</pre>
<pre class="cython line score-0">&#xA0;<span class="">273</span>: until the optional timeout occurs.</pre>
<pre class="cython line score-0">&#xA0;<span class="">274</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">275</span>: When the *timeout* argument is present and not ``None``, it should be a</pre>
<pre class="cython line score-0">&#xA0;<span class="">276</span>: floating point number specifying a timeout for the operation in seconds</pre>
<pre class="cython line score-0">&#xA0;<span class="">277</span>: (or fractions thereof). If the *timeout* elapses, the *Timeout* exception will</pre>
<pre class="cython line score-0">&#xA0;<span class="">278</span>: be raised.</pre>
<pre class="cython line score-0">&#xA0;<span class="">279</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">280</span>: :keyword bool block: If set to ``False`` and this instance is not ready,</pre>
<pre class="cython line score-0">&#xA0;<span class="">281</span>: immediately raise a :class:`Timeout` exception.</pre>
<pre class="cython line score-0">&#xA0;<span class="">282</span>: """</pre>
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">283</span>: if self._value is not _NONE:</pre>
<pre class='cython code score-3 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_NONE);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_t_7 = (__pyx_v_self-&gt;_value != __pyx_t_1);
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
__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="">284</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-&gt;_value);
__pyx_r = __pyx_v_self-&gt;_value;
goto __pyx_L0;
</pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">285</span>: if self._exc_info:</pre>
<pre class='cython code score-1 '> __pyx_t_8 = (__pyx_v_self-&gt;_exc_info != Py_None)&amp;&amp;(<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_v_self-&gt;_exc_info) != 0);
if (__pyx_t_8) {
/* … */
}
</pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">286</span>: return self._raise_exception()</pre>
<pre class='cython code score-19 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_2 = <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_2)) __PYX_ERR(0, 286, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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, 286, __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">&#xA0;<span class="">287</span>: </pre>
<pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">288</span>: if not block:</pre>
<pre class='cython code score-2 '> __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_block); if (unlikely(__pyx_t_8 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 288, __pyx_L1_error)</span>
__pyx_t_7 = ((!__pyx_t_8) != 0);
if (unlikely(__pyx_t_7)) {
/* … */
}
</pre><pre class="cython line score-0">&#xA0;<span class="">289</span>: # Not ready and not blocking, so immediately timeout</pre>
<pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">290</span>: raise Timeout()</pre>
<pre class='cython code score-20 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_6_event_Timeout);
__pyx_t_2 = __pyx_v_6gevent_6_event_Timeout; __pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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) ? <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, 290, __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, 290, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">291</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">292</span>: # Wait, raising a timeout that elapses</pre>
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">293</span>: self._wait_core(timeout, ())</pre>
<pre class='cython code score-1 '> __pyx_t_9.__pyx_n = 1;
__pyx_t_9.catch = __pyx_empty_tuple;
__pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_event_AsyncResult *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;__pyx_base._wait_core(((struct __pyx_obj_6gevent_19__abstract_linkable_AbstractLinkable *)__pyx_v_self), __pyx_v_timeout, &amp;__pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __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">&#xA0;<span class="">294</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">295</span>: # by definition we are now ready</pre>
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">296</span>: return self.get(block=False)</pre>
<pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_10.__pyx_n = 1;
__pyx_t_10.block = Py_False;
__pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_event_AsyncResult *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;get(__pyx_v_self, 0, &amp;__pyx_t_10);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __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">&#xA0;<span class="">297</span>: </pre>
<pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">298</span>: def get_nowait(self):</pre>
<pre class='cython code score-23 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_17get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_16get_nowait[] = "AsyncResult.get_nowait(self)\n\n Return the value or raise the exception without blocking.\n\n If this object is not yet :meth:`ready &lt;ready&gt;`, raise\n :class:`gevent.Timeout` immediately.\n ";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_17get_nowait = {"get_nowait", (PyCFunction)__pyx_pw_6gevent_6_event_11AsyncResult_17get_nowait, METH_NOARGS, __pyx_doc_6gevent_6_event_11AsyncResult_16get_nowait};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_17get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_nowait (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_11AsyncResult_16get_nowait(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_16get_nowait(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_nowait", 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._event.AsyncResult.get_nowait", __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__32 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 298, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__32);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__32);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_17get_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_get_nowait, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__33));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_get_nowait, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 298, __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_6_event_AsyncResult);
__pyx_codeobj__33 = (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__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_get_nowait, 298, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 298, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">299</span>: """</pre>
<pre class="cython line score-0">&#xA0;<span class="">300</span>: Return the value or raise the exception without blocking.</pre>
<pre class="cython line score-0">&#xA0;<span class="">301</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">302</span>: If this object is not yet :meth:`ready &lt;ready&gt;`, raise</pre>
<pre class="cython line score-0">&#xA0;<span class="">303</span>: :class:`gevent.Timeout` immediately.</pre>
<pre class="cython line score-0">&#xA0;<span class="">304</span>: """</pre>
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">305</span>: return self.get(block=False)</pre>
<pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_2.__pyx_n = 1;
__pyx_t_2.block = Py_False;
__pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_event_AsyncResult *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;get(__pyx_v_self, 0, &amp;__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __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">&#xA0;<span class="">306</span>: </pre>
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">307</span>: def _wait_return_value(self, waited, wait_success):</pre>
<pre class='cython code score-3 '>static PyObject *__pyx_f_6gevent_6_event_11AsyncResult__wait_return_value(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_waited, CYTHON_UNUSED PyObject *__pyx_v_wait_success) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("_wait_return_value", 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._event.AsyncResult._wait_return_value", __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">&#xA0;<span class="">308</span>: # pylint:disable=unused-argument</pre>
<pre class="cython line score-0">&#xA0;<span class="">309</span>: # Always return the value. Since this is a one-shot event,</pre>
<pre class="cython line score-0">&#xA0;<span class="">310</span>: # no race condition should reset it.</pre>
<pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">311</span>: return self.value</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_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_value);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __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">&#xA0;<span class="">312</span>: </pre>
<pre class="cython line score-78" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">313</span>: def wait(self, timeout=None):</pre>
<pre class='cython code score-78 '>static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_19wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_6gevent_6_event_11AsyncResult_wait(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_event_11AsyncResult_wait *__pyx_optional_args) {
PyObject *__pyx_v_timeout = ((PyObject *)Py_None);
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("wait", 0);
if (__pyx_optional_args) {
if (__pyx_optional_args-&gt;__pyx_n &gt; 0) {
__pyx_v_timeout = __pyx_optional_args-&gt;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))-&gt;tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_flags &amp; (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
#if CYTHON_USE_DICT_VERSIONS &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
if (likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict &amp;&amp; tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) &amp;&amp; (!Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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))-&gt;tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
#endif
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_wait);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __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_6_event_11AsyncResult_19wait)) {
<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 &amp;&amp; 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, 313, __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 &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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 &amp;&amp; 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._event.AsyncResult.wait", __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_6_event_11AsyncResult_19wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_18wait[] = "AsyncResult.wait(self, timeout=None)\nBlock until the instance is ready.\n\n If this instance already holds a value, it is returned immediately. If this\n instance already holds an exception, ``None`` is returned immediately.\n\n Otherwise, block until another greenlet calls :meth:`set` or :meth:`set_exception`\n (at which point either the value or ``None`` will be returned, respectively),\n or until the optional timeout expires (at which point ``None`` will also be\n returned).\n\n When the *timeout* argument is present and not ``None``, it should be a\n floating point number specifying a timeout for the operation in seconds\n (or fractions thereof).\n\n .. note:: If a timeout is given and expires, ``None`` will be returned\n (no timeout exception will be raised).\n\n ";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_19wait = {"wait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_event_11AsyncResult_19wait, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_event_11AsyncResult_18wait};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_19wait(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>("wait (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__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 &gt; 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 &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 313, __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>("wait", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 313, __pyx_L3_error)</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.wait", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_6gevent_6_event_11AsyncResult_18wait(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self), __pyx_v_timeout);
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_18wait(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, PyObject *__pyx_v_timeout) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("wait", 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_6_event_AsyncResult-&gt;wait(__pyx_v_self, 1, &amp;__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __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._event.AsyncResult.wait", __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__34 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_timeout);<span class='error_goto'> if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 313, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__34);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__34);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_19wait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_wait, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__35));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_wait, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 313, __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_6_event_AsyncResult);
__pyx_codeobj__35 = (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__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_wait, 313, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 313, __pyx_L1_error)</span>
</pre><pre class="cython line score-0">&#xA0;<span class="">314</span>: """Block until the instance is ready.</pre>
<pre class="cython line score-0">&#xA0;<span class="">315</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">316</span>: If this instance already holds a value, it is returned immediately. If this</pre>
<pre class="cython line score-0">&#xA0;<span class="">317</span>: instance already holds an exception, ``None`` is returned immediately.</pre>
<pre class="cython line score-0">&#xA0;<span class="">318</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">319</span>: Otherwise, block until another greenlet calls :meth:`set` or :meth:`set_exception`</pre>
<pre class="cython line score-0">&#xA0;<span class="">320</span>: (at which point either the value or ``None`` will be returned, respectively),</pre>
<pre class="cython line score-0">&#xA0;<span class="">321</span>: or until the optional timeout expires (at which point ``None`` will also be</pre>
<pre class="cython line score-0">&#xA0;<span class="">322</span>: returned).</pre>
<pre class="cython line score-0">&#xA0;<span class="">323</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">324</span>: When the *timeout* argument is present and not ``None``, it should be a</pre>
<pre class="cython line score-0">&#xA0;<span class="">325</span>: floating point number specifying a timeout for the operation in seconds</pre>
<pre class="cython line score-0">&#xA0;<span class="">326</span>: (or fractions thereof).</pre>
<pre class="cython line score-0">&#xA0;<span class="">327</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">328</span>: .. note:: If a timeout is given and expires, ``None`` will be returned</pre>
<pre class="cython line score-0">&#xA0;<span class="">329</span>: (no timeout exception will be raised).</pre>
<pre class="cython line score-0">&#xA0;<span class="">330</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">331</span>: """</pre>
<pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">332</span>: return self._wait(timeout)</pre>
<pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r);
__pyx_t_5.__pyx_n = 1;
__pyx_t_5.timeout = __pyx_v_timeout;
__pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_event_AsyncResult *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;__pyx_base._wait(((struct __pyx_obj_6gevent_19__abstract_linkable_AbstractLinkable *)__pyx_v_self), &amp;__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __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">&#xA0;<span class="">333</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">334</span>: # link protocol</pre>
<pre class="cython line score-27" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">335</span>: def __call__(self, source):</pre>
<pre class='cython code score-27 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_21__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_21__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[] = {&amp;__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 &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 335, __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, 335, __pyx_L3_error)</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.__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_6_event_11AsyncResult_20__call__(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self), __pyx_v_source);
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_20__call__(struct __pyx_obj_6gevent_6_event_AsyncResult *__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_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._event.AsyncResult.__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="">336</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, 336, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_3 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; 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, 336, __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 &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 336, __pyx_L1_error)</span>
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_4) {
/* … */
goto __pyx_L3;
}
</pre><pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">337</span>: self.set(source.value)</pre>
<pre class='cython code score-20 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_set);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __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_v_source, __pyx_n_s_value);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_5 = NULL;
if (CYTHON_UNPACK_METHODS &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
__pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
if (likely(__pyx_t_5)) {
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
<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_2, function);
}
}
__pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __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_5); __pyx_t_5 = 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, 337, __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">&#xA0;<span class="">338</span>: else:</pre>
<pre class="cython line score-44" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">339</span>: self.set_exception(source.exception, getattr(source, 'exc_info', None))</pre>
<pre class='cython code score-44 '> /*else*/ {
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_set_exception);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __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_v_source, __pyx_n_s_exception_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
__pyx_t_5 = __Pyx_GetAttr3(__pyx_v_source, __pyx_n_s_exc_info, Py_None);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 339, __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 &amp;&amp; likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) {
__pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2);
if (likely(__pyx_t_6)) {
PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2);
<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_2, function);
__pyx_t_7 = 1;
}
}
#if CYTHON_FAST_PYCALL
if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_2)) {
PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_5};
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __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_1);
<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_5); __pyx_t_5 = 0;
} 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_6, __pyx_t_3, __pyx_t_5};
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __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_1);
<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_5); __pyx_t_5 = 0;
} else
#endif
{
__pyx_t_8 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_7);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 339, __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_3);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
__pyx_t_3 = 0;
__pyx_t_5 = 0;
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_8, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
<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_2); __pyx_t_2 = 0;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0;
}
__pyx_L3:;
</pre><pre class="cython line score-0">&#xA0;<span class="">340</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">341</span>: # Methods to make us more like concurrent.futures.Future</pre>
<pre class="cython line score-0">&#xA0;<span class="">342</span>: </pre>
<pre class="cython line score-43" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">343</span>: def result(self, timeout=None):</pre>
<pre class='cython code score-43 '>/* Python wrapper */
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_23result(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_22result[] = "AsyncResult.result(self, timeout=None)";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_23result = {"result", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_event_11AsyncResult_23result, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_event_11AsyncResult_22result};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_23result(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>("result (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&amp;__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 &gt; 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 &gt; 0)) {
if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "result") &lt; 0)) <span class='error_goto'>__PYX_ERR(0, 343, __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>("result", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 343, __pyx_L3_error)</span>
__pyx_L3_error:;
<span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._event.AsyncResult.result", __pyx_clineno, __pyx_lineno, __pyx_filename);
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return NULL;
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_6gevent_6_event_11AsyncResult_22result(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self), __pyx_v_timeout);
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_22result(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, PyObject *__pyx_v_timeout) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("result", 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._event.AsyncResult.result", __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__36 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_timeout);<span class='error_goto'> if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 343, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__36);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__36);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_23result, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_result, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__37));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_result, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 343, __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_6_event_AsyncResult);
__pyx_codeobj__37 = (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__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_result, 343, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 343, __pyx_L1_error)</span>
</pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">344</span>: return self.get(timeout=timeout)</pre>
<pre class='cython code score-14 '> <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_get);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1);
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_2, __pyx_n_s_timeout, __pyx_v_timeout) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 344, __pyx_L1_error)</span>
__pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __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_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">345</span>: </pre>
<pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">346</span>: set_result = set</pre>
<pre class='cython code score-13 '> <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_2, (PyObject *)__pyx_ptype_6gevent_6_event_AsyncResult, __pyx_n_s_set);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_set_result, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 346, __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_6_event_AsyncResult);
</pre><pre class="cython line score-0">&#xA0;<span class="">347</span>: </pre>
<pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">348</span>: def done(self):</pre>
<pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_25done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_6gevent_6_event_11AsyncResult_done(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, int __pyx_skip_dispatch) {
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("done", 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))-&gt;tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_flags &amp; (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
#if CYTHON_USE_DICT_VERSIONS &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
if (likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict &amp;&amp; tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) &amp;&amp; (!Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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))-&gt;tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
#endif
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_done);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __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_6_event_11AsyncResult_25done)) {
<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 &amp;&amp; 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, 348, __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) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 348, __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 &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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 &amp;&amp; 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._event.AsyncResult.done", __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_6_event_11AsyncResult_25done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_24done[] = "AsyncResult.done(self) -&gt; bool";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_25done = {"done", (PyCFunction)__pyx_pw_6gevent_6_event_11AsyncResult_25done, METH_NOARGS, __pyx_doc_6gevent_6_event_11AsyncResult_24done};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_25done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("done (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_11AsyncResult_24done(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_24done(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("done", 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_6_event_11AsyncResult_done(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __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._event.AsyncResult.done", __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__38 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 348, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__38);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__38);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_25done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_done, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__39));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_done, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 348, __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_6_event_AsyncResult);
__pyx_codeobj__39 = (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__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_done, 348, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 348, __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="">349</span>: return self.ready()</pre>
<pre class='cython code score-0 '> __pyx_r = ((struct __pyx_vtabstruct_6gevent_6_event_AsyncResult *)__pyx_v_self-&gt;__pyx_base.__pyx_vtab)-&gt;__pyx_base.ready(((struct __pyx_obj_6gevent_19__abstract_linkable_AbstractLinkable *)__pyx_v_self), 0);
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">350</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">351</span>: # we don't support cancelling</pre>
<pre class="cython line score-0">&#xA0;<span class="">352</span>: </pre>
<pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">353</span>: def cancel(self):</pre>
<pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_27cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_6gevent_6_event_11AsyncResult_cancel(CYTHON_UNUSED struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, int __pyx_skip_dispatch) {
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("cancel", 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))-&gt;tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_flags &amp; (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
#if CYTHON_USE_DICT_VERSIONS &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
if (likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict &amp;&amp; tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) &amp;&amp; (!Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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))-&gt;tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
#endif
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __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_6_event_11AsyncResult_27cancel)) {
<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 &amp;&amp; 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, 353, __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) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 353, __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 &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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 &amp;&amp; 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._event.AsyncResult.cancel", __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_6_event_11AsyncResult_27cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_26cancel[] = "AsyncResult.cancel(self) -&gt; bool";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_27cancel = {"cancel", (PyCFunction)__pyx_pw_6gevent_6_event_11AsyncResult_27cancel, METH_NOARGS, __pyx_doc_6gevent_6_event_11AsyncResult_26cancel};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_27cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("cancel (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_11AsyncResult_26cancel(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_26cancel(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("cancel", 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_6_event_11AsyncResult_cancel(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __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._event.AsyncResult.cancel", __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__40 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 353, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__40);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__40);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_27cancel, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_cancel, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__41));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_cancel, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 353, __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_6_event_AsyncResult);
__pyx_codeobj__41 = (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__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_event_py, __pyx_n_s_cancel, 353, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 353, __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="">354</span>: return False</pre>
<pre class='cython code score-0 '> __pyx_r = 0;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">355</span>: </pre>
<pre class="cython line score-69" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">356</span>: def cancelled(self):</pre>
<pre class='cython code score-69 '>static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_29cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_6gevent_6_event_11AsyncResult_cancelled(CYTHON_UNUSED struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self, int __pyx_skip_dispatch) {
int __pyx_r;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("cancelled", 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))-&gt;tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_flags &amp; (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
#if CYTHON_USE_DICT_VERSIONS &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0;
if (likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict &amp;&amp; tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) &amp;&amp; (!Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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))-&gt;tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
#endif
__pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_cancelled);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __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_6_event_11AsyncResult_29cancelled)) {
<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 &amp;&amp; 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, 356, __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) &amp;&amp; <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 356, __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 &amp;&amp; CYTHON_USE_PYTYPE_LOOKUP
tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;tp_dict) : 0;
obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))-&gt;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 &amp;&amp; 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._event.AsyncResult.cancelled", __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_6_event_11AsyncResult_29cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_6gevent_6_event_11AsyncResult_28cancelled[] = "AsyncResult.cancelled(self) -&gt; bool";
static PyMethodDef __pyx_mdef_6gevent_6_event_11AsyncResult_29cancelled = {"cancelled", (PyCFunction)__pyx_pw_6gevent_6_event_11AsyncResult_29cancelled, METH_NOARGS, __pyx_doc_6gevent_6_event_11AsyncResult_28cancelled};
static PyObject *__pyx_pw_6gevent_6_event_11AsyncResult_29cancelled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
PyObject *__pyx_r = 0;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("cancelled (wrapper)", 0);
__pyx_r = __pyx_pf_6gevent_6_event_11AsyncResult_28cancelled(((struct __pyx_obj_6gevent_6_event_AsyncResult *)__pyx_v_self));
/* function exit code */
<span class='refnanny'>__Pyx_RefNannyFinishContext</span>();
return __pyx_r;
}
static PyObject *__pyx_pf_6gevent_6_event_11AsyncResult_28cancelled(struct __pyx_obj_6gevent_6_event_AsyncResult *__pyx_v_self) {
PyObject *__pyx_r = NULL;
<span class='refnanny'>__Pyx_RefNannyDeclarations</span>
<span class='refnanny'>__Pyx_RefNannySetupContext</span>("cancelled", 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_6_event_11AsyncResult_cancelled(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __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._event.AsyncResult.cancelled", __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__42 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 356, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__42);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__42);
/* … */
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&amp;__pyx_mdef_6gevent_6_event_11AsyncResult_29cancelled, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AsyncResult_cancelled, NULL, __pyx_n_s_gevent__event, __pyx_d, ((PyObject *)__pyx_codeobj__43));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __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_6_event_AsyncResult-&gt;tp_dict, __pyx_n_s_cancelled, __pyx_t_2) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 356, __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_6_event_AsyncResult);
</pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">357</span>: return False</pre>
<pre class='cython code score-0 '> __pyx_r = 0;
goto __pyx_L0;
</pre><pre class="cython line score-0">&#xA0;<span class="">358</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">359</span>: # exception is a method, we use it as a property</pre>
<pre class="cython line score-0">&#xA0;<span class="">360</span>: </pre>
<pre class="cython line score-0">&#xA0;<span class="">361</span>: </pre>
<pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">362</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, 362, __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, 362, __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, 362, __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) &lt; 0) <span class='error_goto'>__PYX_ERR(0, 362, __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="">363</span>: import_c_accel(globals(), 'gevent._event')</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, 363, __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, 363, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2);
__pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)</span>
<span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_2);
<span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_gevent__event);
<span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_gevent__event);
<span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 1, __pyx_n_s_gevent__event);
__pyx_t_2 = 0;
__pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_3, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __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_3); __pyx_t_3 = 0;
<span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0;
</pre></div></body></html>