Server IP : 85.214.239.14 / Your IP : 18.224.43.98 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /srv/modoboa/env/lib64/python3.5/site-packages/gevent/ |
Upload File : |
<!DOCTYPE html> <!-- Generated by Cython 0.29.2 --> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Cython: queue.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="queue.c">queue.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-2012 Denis Bilenko. See LICENSE for details.</pre> <pre class='cython code score-8 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 1, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; </pre><pre class="cython line score-0"> <span class="">002</span>: # copyright (c) 2018 gevent</pre> <pre class="cython line score-0"> <span class="">003</span>: # cython: auto_pickle=False,embedsignature=True,always_allow_keywords=False</pre> <pre class="cython line score-0"> <span class="">004</span>: """</pre> <pre class="cython line score-0"> <span class="">005</span>: Synchronized queues.</pre> <pre class="cython line score-0"> <span class="">006</span>: </pre> <pre class="cython line score-0"> <span class="">007</span>: The :mod:`gevent.queue` module implements multi-producer, multi-consumer queues</pre> <pre class="cython line score-0"> <span class="">008</span>: that work across greenlets, with the API similar to the classes found in the</pre> <pre class="cython line score-0"> <span class="">009</span>: standard :mod:`Queue` and :class:`multiprocessing <multiprocessing.Queue>` modules.</pre> <pre class="cython line score-0"> <span class="">010</span>: </pre> <pre class="cython line score-0"> <span class="">011</span>: The classes in this module implement the iterator protocol. Iterating</pre> <pre class="cython line score-0"> <span class="">012</span>: over a queue means repeatedly calling :meth:`get <Queue.get>` until</pre> <pre class="cython line score-0"> <span class="">013</span>: :meth:`get <Queue.get>` returns ``StopIteration`` (specifically that</pre> <pre class="cython line score-0"> <span class="">014</span>: class, not an instance or subclass).</pre> <pre class="cython line score-0"> <span class="">015</span>: </pre> <pre class="cython line score-0"> <span class="">016</span>: >>> queue = gevent.queue.Queue()</pre> <pre class="cython line score-0"> <span class="">017</span>: >>> queue.put(1)</pre> <pre class="cython line score-0"> <span class="">018</span>: >>> queue.put(2)</pre> <pre class="cython line score-0"> <span class="">019</span>: >>> queue.put(StopIteration)</pre> <pre class="cython line score-0"> <span class="">020</span>: >>> for item in queue:</pre> <pre class="cython line score-0"> <span class="">021</span>: ... print(item)</pre> <pre class="cython line score-0"> <span class="">022</span>: 1</pre> <pre class="cython line score-0"> <span class="">023</span>: 2</pre> <pre class="cython line score-0"> <span class="">024</span>: </pre> <pre class="cython line score-0"> <span class="">025</span>: .. versionchanged:: 1.0</pre> <pre class="cython line score-0"> <span class="">026</span>: ``Queue(0)`` now means queue of infinite size, not a channel. A :exc:`DeprecationWarning`</pre> <pre class="cython line score-0"> <span class="">027</span>: will be issued with this argument.</pre> <pre class="cython line score-0"> <span class="">028</span>: """</pre> <pre class="cython line score-0"> <span class="">029</span>: </pre> <pre class="cython line score-0"> <span class="">030</span>: from __future__ import absolute_import</pre> <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">031</span>: import sys</pre> <pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_sys, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 31, __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-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">032</span>: from heapq import heappush as _heappush</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_heappush_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_heappush_2); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_heappush_2); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_heapq, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __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_heappush_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __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_queue__heappush); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_6_queue__heappush, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">033</span>: from heapq import heappop as _heappop</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, 33, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_heappop_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_heappop_2); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_heappop_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_heapq, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __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_heappop_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __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_queue__heappop); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_6_queue__heappop, __pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">034</span>: from heapq import heapify as _heapify</pre> <pre class='cython code score-16 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_heapify_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_heapify_2); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_heapify_2); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_heapq, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __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_heapify_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_v_6gevent_6_queue__heapify); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_6gevent_6_queue__heapify, __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-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">035</span>: import collections</pre> <pre class='cython code score-8 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_collections, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __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_collections, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 35, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">036</span>: </pre> <pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">037</span>: if sys.version_info[0] == 2:</pre> <pre class='cython code score-14 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_sys);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_version_info);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __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_GetItemInt</span>(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __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_PyInt_EqObjC</span>(__pyx_t_2, __pyx_int_2, 2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __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_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 37, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ goto __pyx_L2; } </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">038</span>: import Queue as __queue__ # python 3: pylint:disable=import-error</pre> <pre class='cython code score-8 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_Queue, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __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_queue_2, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 38, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">039</span>: else:</pre> <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">040</span>: import queue as __queue__ # python 2: pylint:disable=import-error</pre> <pre class='cython code score-8 '> /*else*/ { __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_queue, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __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_queue_2, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 40, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L2:; </pre><pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">041</span>: Full = __queue__.Full</pre> <pre class='cython code score-11 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_queue_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __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_Full);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Full, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 41, __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-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">042</span>: Empty = __queue__.Empty</pre> <pre class='cython code score-11 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_queue_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_Empty);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_Empty, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 42, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">043</span>: </pre> <pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">044</span>: from gevent.timeout import Timeout</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, 44, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Timeout); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Timeout); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_Timeout); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent_timeout, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_2, __pyx_n_s_Timeout);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __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_Timeout, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 44, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">045</span>: from gevent._hub_local import get_hub_noargs as get_hub</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, 45, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_get_hub_noargs); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_get_hub_noargs); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_get_hub_noargs); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__hub_local, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <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_get_hub_noargs);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_get_hub, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 45, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">046</span>: from greenlet import getcurrent</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, 46, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_getcurrent); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_getcurrent); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_getcurrent); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_greenlet, __pyx_t_1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __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_getcurrent);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_getcurrent, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 46, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">047</span>: from gevent.exceptions import InvalidSwitchError</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, 47, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_InvalidSwitchError); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_InvalidSwitchError); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_2, 0, __pyx_n_s_InvalidSwitchError); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent_exceptions, __pyx_t_2, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_InvalidSwitchError);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_InvalidSwitchError, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 47, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">048</span>: </pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">049</span>: __all__ = []</pre> <pre class='cython code score-11 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __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_all, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 49, __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-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">050</span>: __implements__ = ['Queue', 'PriorityQueue', 'LifoQueue']</pre> <pre class='cython code score-17 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Queue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Queue); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_Queue); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_PriorityQueue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_PriorityQueue); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 1, __pyx_n_s_PriorityQueue); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_LifoQueue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_LifoQueue); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 2, __pyx_n_s_LifoQueue); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_implements, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 50, __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-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">051</span>: __extensions__ = ['JoinableQueue', 'Channel']</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, 51, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_JoinableQueue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_JoinableQueue); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_JoinableQueue); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Channel); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Channel); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 1, __pyx_n_s_Channel); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_extensions, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 51, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">052</span>: __imports__ = ['Empty', 'Full']</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, 52, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Empty); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Empty); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 0, __pyx_n_s_Empty); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_Full); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_Full); <span class='py_macro_api'>PyList_SET_ITEM</span>(__pyx_t_1, 1, __pyx_n_s_Full); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_imports, __pyx_t_1) < 0) <span class='error_goto'>__PYX_ERR(0, 52, __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-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">053</span>: if hasattr(__queue__, 'SimpleQueue'):</pre> <pre class='cython code score-5 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_queue_2);<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_3 = <span class='pyx_c_api'>__Pyx_HasAttr</span>(__pyx_t_1, __pyx_n_s_SimpleQueue);<span class='error_goto'> if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 53, __pyx_L1_error)</span> <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-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">054</span>: __all__.append('SimpleQueue') # New in 3.7</pre> <pre class='cython code score-5 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_all);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_t_1, __pyx_n_s_SimpleQueue);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 54, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">055</span>: # SimpleQueue is implemented in C and directly allocates locks</pre> <pre class="cython line score-0"> <span class="">056</span>: # unaffected by monkey patching. We need the Python version.</pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">057</span>: SimpleQueue = __queue__._PySimpleQueue # pylint:disable=no-member</pre> <pre class='cython code score-11 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_queue_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __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_PySimpleQueue);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_SimpleQueue, __pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 57, __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-35" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">058</span>: __all__ += (__implements__ + __extensions__ + __imports__)</pre> <pre class='cython code score-35 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_all);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __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_implements);<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); <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_6, __pyx_n_s_extensions);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 58, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_7 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_1, __pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 58, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_6, __pyx_n_s_imports);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 58, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_1 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_t_7, __pyx_t_6);<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); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = <span class='py_c_api'>PyNumber_InPlaceAdd</span>(__pyx_t_2, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 58, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <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; if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_all, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 58, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; </pre><pre class="cython line score-0"> <span class="">059</span>: </pre> <pre class="cython line score-0"> <span class="">060</span>: </pre> <pre class="cython line score-0"> <span class="">061</span>: # pylint 2.0.dev2 things collections.dequeue.popleft() doesn't return</pre> <pre class="cython line score-0"> <span class="">062</span>: # pylint:disable=assignment-from-no-return</pre> <pre class="cython line score-0"> <span class="">063</span>: </pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">064</span>: def _safe_remove(deq, item):</pre> <pre class='cython code score-6 '>static PyObject *__pyx_f_6gevent_6_queue__safe_remove(PyObject *__pyx_v_deq, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_safe_remove", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue._safe_remove", __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"> <span class="">065</span>: # For when the item may have been removed by</pre> <pre class="cython line score-0"> <span class="">066</span>: # Queue._unlock</pre> <pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">067</span>: try:</pre> <pre class='cython code score-10 '> { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">068</span>: deq.remove(item)</pre> <pre class='cython code score-17 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_deq, __pyx_n_s_remove);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 68, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_v_item); <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, 68, __pyx_L3_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">069</span>: except ValueError:</pre> <pre class='cython code score-4 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyErr_ExceptionMatches</span>(__pyx_builtin_ValueError); if (__pyx_t_7) { <span class='pyx_c_api'>__Pyx_ErrRestore</span>(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; </pre><pre class="cython line score-0"> <span class="">070</span>: pass</pre> <pre class="cython line score-0"> <span class="">071</span>: </pre> <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">072</span>: import gevent._waiter</pre> <pre class='cython code score-8 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent__waiter, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 72, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_gevent, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 72, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">073</span>: locals()['Waiter'] = gevent._waiter.Waiter</pre> <pre class='cython code score-17 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_6, __pyx_n_s_gevent);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_6, __pyx_n_s_waiter);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_Waiter);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __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_Waiter, __pyx_t_6) < 0)) <span class='error_goto'>__PYX_ERR(0, 73, __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_6); __pyx_t_6 = 0; </pre><pre class="cython line score-0"> <span class="">074</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">075</span>: class ItemWaiter(Waiter): # pylint:disable=undefined-variable</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_queue_ItemWaiter { struct __pyx_vtabstruct_6gevent_8__waiter_Waiter __pyx_base; }; static struct __pyx_vtabstruct_6gevent_6_queue_ItemWaiter *__pyx_vtabptr_6gevent_6_queue_ItemWaiter; </pre><pre class="cython line score-0"> <span class="">076</span>: # pylint:disable=assigning-non-slot</pre> <pre class="cython line score-0"> <span class="">077</span>: __slots__ = (</pre> <pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">078</span>: 'item',</pre> <pre class='cython code score-15 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_ItemWaiter->tp_dict, __pyx_n_s_slots, __pyx_tuple__7) < 0) <span class='error_goto'>__PYX_ERR(0, 77, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_ItemWaiter); /* … */ __pyx_tuple__7 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_item, __pyx_n_s_queue);<span class='error_goto'> if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 78, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__7); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__7); </pre><pre class="cython line score-0"> <span class="">079</span>: 'queue',</pre> <pre class="cython line score-0"> <span class="">080</span>: )</pre> <pre class="cython line score-0"> <span class="">081</span>: </pre> <pre class="cython line score-29" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">082</span>: def __init__(self, item, queue):</pre> <pre class='cython code score-29 '>/* Python wrapper */ static int __pyx_pw_6gevent_6_queue_10ItemWaiter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6gevent_6_queue_10ItemWaiter_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_item = 0; PyObject *__pyx_v_queue = 0; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_queue,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 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_item)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_queue)) != 0)) kw_args--; else { <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 2, 2, 1); <span class='error_goto'>__PYX_ERR(0, 82, __pyx_L3_error)</span> } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 82, __pyx_L3_error)</span> } } else if (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); } __pyx_v_item = values[0]; __pyx_v_queue = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 1, 2, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 82, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.ItemWaiter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_6_queue_10ItemWaiter___init__(((struct __pyx_obj_6gevent_6_queue_ItemWaiter *)__pyx_v_self), __pyx_v_item, __pyx_v_queue); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_6_queue_10ItemWaiter___init__(struct __pyx_obj_6gevent_6_queue_ItemWaiter *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_queue) { 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._queue.ItemWaiter.__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-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">083</span>: Waiter.__init__(self) # pylint:disable=undefined-variable</pre> <pre class='cython code score-17 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_8__waiter_Waiter), __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 83, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">084</span>: self.item = item</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_item); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_item); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->item); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->item); __pyx_v_self->item = __pyx_v_item; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">085</span>: self.queue = queue</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_queue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_queue); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->queue); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->queue); __pyx_v_self->queue = __pyx_v_queue; </pre><pre class="cython line score-0"> <span class="">086</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">087</span>: def put_and_switch(self):</pre> <pre class='cython code score-25 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_10ItemWaiter_3put_and_switch(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_10ItemWaiter_2put_and_switch[] = "ItemWaiter.put_and_switch(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_10ItemWaiter_3put_and_switch = {"put_and_switch", (PyCFunction)__pyx_pw_6gevent_6_queue_10ItemWaiter_3put_and_switch, METH_NOARGS, __pyx_doc_6gevent_6_queue_10ItemWaiter_2put_and_switch}; static PyObject *__pyx_pw_6gevent_6_queue_10ItemWaiter_3put_and_switch(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put_and_switch (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_10ItemWaiter_2put_and_switch(((struct __pyx_obj_6gevent_6_queue_ItemWaiter *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_10ItemWaiter_2put_and_switch(struct __pyx_obj_6gevent_6_queue_ItemWaiter *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put_and_switch", 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._queue.ItemWaiter.put_and_switch", __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__8 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 87, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__8); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__8); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_10ItemWaiter_3put_and_switch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ItemWaiter_put_and_switch, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__9));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_ItemWaiter->tp_dict, __pyx_n_s_put_and_switch, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 87, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_ItemWaiter); __pyx_codeobj__9 = (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__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_and_switch, 87, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 87, __pyx_L1_error)</span> </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">088</span>: self.queue._put(self.item)</pre> <pre class='cython code score-17 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->queue, __pyx_n_s_put);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_v_self->item); <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, 88, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">089</span>: self.queue = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->queue); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->queue); __pyx_v_self->queue = Py_None; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">090</span>: self.item = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->item); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->item); __pyx_v_self->item = Py_None; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">091</span>: return self.switch(self)</pre> <pre class='cython code score-17 '> <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_switch);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 91, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">092</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">093</span>: class Queue(object):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_queue_Queue { PyObject *(*_get)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch); PyObject *(*_put)(struct __pyx_obj_6gevent_6_queue_Queue *, PyObject *, int __pyx_skip_dispatch); PyObject *(*_peek)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch); Py_ssize_t (*qsize)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch); int (*empty)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch); int (*full)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch); PyObject *(*put)(struct __pyx_obj_6gevent_6_queue_Queue *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_5Queue_put *__pyx_optional_args); PyObject *(*put_nowait)(struct __pyx_obj_6gevent_6_queue_Queue *, PyObject *, int __pyx_skip_dispatch); PyObject *(*__pyx___get_or_peek)(struct __pyx_obj_6gevent_6_queue_Queue *, PyObject *, PyObject *, PyObject *); PyObject *(*get)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_5Queue_get *__pyx_optional_args); PyObject *(*get_nowait)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch); PyObject *(*peek)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_5Queue_peek *__pyx_optional_args); PyObject *(*peek_nowait)(struct __pyx_obj_6gevent_6_queue_Queue *, int __pyx_skip_dispatch); PyObject *(*_schedule_unlock)(struct __pyx_obj_6gevent_6_queue_Queue *); }; static struct __pyx_vtabstruct_6gevent_6_queue_Queue *__pyx_vtabptr_6gevent_6_queue_Queue; </pre><pre class="cython line score-0"> <span class="">094</span>: """</pre> <pre class="cython line score-0"> <span class="">095</span>: Create a queue object with a given maximum size.</pre> <pre class="cython line score-0"> <span class="">096</span>: </pre> <pre class="cython line score-0"> <span class="">097</span>: If *maxsize* is less than or equal to zero or ``None``, the queue</pre> <pre class="cython line score-0"> <span class="">098</span>: size is infinite.</pre> <pre class="cython line score-0"> <span class="">099</span>: </pre> <pre class="cython line score-0"> <span class="">100</span>: Queues have a ``len`` equal to the number of items in them (the :meth:`qsize`),</pre> <pre class="cython line score-0"> <span class="">101</span>: but in a boolean context they are always True.</pre> <pre class="cython line score-0"> <span class="">102</span>: </pre> <pre class="cython line score-0"> <span class="">103</span>: .. versionchanged:: 1.1b3</pre> <pre class="cython line score-0"> <span class="">104</span>: Queues now support :func:`len`; it behaves the same as :meth:`qsize`.</pre> <pre class="cython line score-0"> <span class="">105</span>: .. versionchanged:: 1.1b3</pre> <pre class="cython line score-0"> <span class="">106</span>: Multiple greenlets that block on a call to :meth:`put` for a full queue</pre> <pre class="cython line score-0"> <span class="">107</span>: will now be awakened to put their items into the queue in the order in which</pre> <pre class="cython line score-0"> <span class="">108</span>: they arrived. Likewise, multiple greenlets that block on a call to :meth:`get` for</pre> <pre class="cython line score-0"> <span class="">109</span>: an empty queue will now receive items in the order in which they blocked. An</pre> <pre class="cython line score-0"> <span class="">110</span>: implementation quirk under CPython *usually* ensured this was roughly the case</pre> <pre class="cython line score-0"> <span class="">111</span>: previously anyway, but that wasn't the case for PyPy.</pre> <pre class="cython line score-0"> <span class="">112</span>: """</pre> <pre class="cython line score-0"> <span class="">113</span>: </pre> <pre class="cython line score-0"> <span class="">114</span>: __slots__ = (</pre> <pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">115</span>: '_maxsize',</pre> <pre class='cython code score-15 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_slots, __pyx_tuple__10) < 0) <span class='error_goto'>__PYX_ERR(0, 114, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); /* … */ __pyx_tuple__10 = <span class='py_c_api'>PyTuple_Pack</span>(7, __pyx_n_s_maxsize_2, __pyx_n_s_getters, __pyx_n_s_putters, __pyx_n_s_hub, __pyx_n_s_event_unlock, __pyx_n_s_queue, __pyx_n_s_weakref);<span class='error_goto'> if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 115, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__10); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__10); </pre><pre class="cython line score-0"> <span class="">116</span>: 'getters',</pre> <pre class="cython line score-0"> <span class="">117</span>: 'putters',</pre> <pre class="cython line score-0"> <span class="">118</span>: 'hub',</pre> <pre class="cython line score-0"> <span class="">119</span>: '_event_unlock',</pre> <pre class="cython line score-0"> <span class="">120</span>: 'queue',</pre> <pre class="cython line score-0"> <span class="">121</span>: '__weakref__',</pre> <pre class="cython line score-0"> <span class="">122</span>: )</pre> <pre class="cython line score-0"> <span class="">123</span>: </pre> <pre class="cython line score-34" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">124</span>: def __init__(self, maxsize=None, items=(), _warn_depth=2):</pre> <pre class='cython code score-34 '>/* Python wrapper */ static int __pyx_pw_6gevent_6_queue_5Queue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6gevent_6_queue_5Queue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_maxsize = 0; PyObject *__pyx_v_items = 0; PyObject *__pyx_v__warn_depth = 0; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,&__pyx_n_s_warn_depth,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)__pyx_empty_tuple); values[2] = ((PyObject *)__pyx_int_2); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_maxsize); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_items); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_warn_depth); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 124, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_maxsize = values[0]; __pyx_v_items = values[1]; __pyx_v__warn_depth = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 0, 0, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 124, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_6_queue_5Queue___init__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items, __pyx_v__warn_depth); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_6_queue_5Queue___init__(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items, PyObject *__pyx_v__warn_depth) { PyObject *__pyx_v_warnings = NULL; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_maxsize); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_warnings); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_maxsize); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">125</span>: if maxsize is not None and maxsize <= 0:</pre> <pre class='cython code score-8 '> __pyx_t_2 = (__pyx_v_maxsize != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_v_maxsize, __pyx_int_0, Py_LE); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)</span> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 125, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">126</span>: if maxsize == 0:</pre> <pre class='cython code score-5 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyInt_EqObjC</span>(__pyx_v_maxsize, __pyx_int_0, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 126, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">127</span>: import warnings</pre> <pre class='cython code score-2 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_warnings, 0, 0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_v_warnings = __pyx_t_4; __pyx_t_4 = 0; </pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">128</span>: warnings.warn(</pre> <pre class='cython code score-12 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_warnings, __pyx_n_s_warn);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_tuple_, __pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __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; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; /* … */ __pyx_tuple_ = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_kp_s_Queue_0_now_equivalent_to_Queue, __pyx_builtin_DeprecationWarning);<span class='error_goto'> if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 128, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple_); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple_); </pre><pre class="cython line score-0"> <span class="">129</span>: 'Queue(0) now equivalent to Queue(None); if you want a channel, use Channel',</pre> <pre class="cython line score-0"> <span class="">130</span>: DeprecationWarning,</pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">131</span>: stacklevel=_warn_depth)</pre> <pre class='cython code score-7 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_5, __pyx_n_s_stacklevel, __pyx_v__warn_depth) < 0) <span class='error_goto'>__PYX_ERR(0, 131, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">132</span>: maxsize = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_maxsize, Py_None); </pre><pre class="cython line score-0"> <span class="">133</span>: </pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">134</span>: self._maxsize = maxsize if maxsize is not None else -1</pre> <pre class='cython code score-7 '> __pyx_t_1 = (__pyx_v_maxsize != Py_None); if ((__pyx_t_1 != 0)) { __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_v_maxsize); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 134, __pyx_L1_error)</span> __pyx_t_7 = __pyx_t_8; } else { __pyx_t_7 = -1L; } __pyx_v_self->_maxsize = __pyx_t_7; </pre><pre class="cython line score-0"> <span class="">135</span>: # Explicitly maintain order for getters and putters that block</pre> <pre class="cython line score-0"> <span class="">136</span>: # so that callers can consistently rely on getting things out</pre> <pre class="cython line score-0"> <span class="">137</span>: # in the apparent order they went in. This was once required by</pre> <pre class="cython line score-0"> <span class="">138</span>: # imap_unordered. Previously these were set() objects, and the</pre> <pre class="cython line score-0"> <span class="">139</span>: # items put in the set have default hash() and eq() methods;</pre> <pre class="cython line score-0"> <span class="">140</span>: # under CPython, since new objects tend to have increasing</pre> <pre class="cython line score-0"> <span class="">141</span>: # hash values, this tended to roughly maintain order anyway,</pre> <pre class="cython line score-0"> <span class="">142</span>: # but that's not true under PyPy. An alternative to a deque</pre> <pre class="cython line score-0"> <span class="">143</span>: # (to avoid the linear scan of remove()) might be an</pre> <pre class="cython line score-0"> <span class="">144</span>: # OrderedDict, but it's 2.7 only; we don't expect to have so</pre> <pre class="cython line score-0"> <span class="">145</span>: # many waiters that removing an arbitrary element is a</pre> <pre class="cython line score-0"> <span class="">146</span>: # bottleneck, though.</pre> <pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">147</span>: self.getters = collections.deque()</pre> <pre class='cython code score-22 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_5, __pyx_n_s_collections);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_5, __pyx_n_s_deque);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_6 = (__pyx_t_5) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 147, __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; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->getters); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->getters); __pyx_v_self->getters = __pyx_t_6; __pyx_t_6 = 0; </pre><pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">148</span>: self.putters = collections.deque()</pre> <pre class='cython code score-22 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_n_s_collections);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_deque);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_6 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 148, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->putters); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->putters); __pyx_v_self->putters = __pyx_t_6; __pyx_t_6 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">149</span>: self.hub = get_hub()</pre> <pre class='cython code score-19 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_5, __pyx_n_s_get_hub);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_6 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 149, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->hub); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->hub); __pyx_v_self->hub = __pyx_t_6; __pyx_t_6 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">150</span>: self._event_unlock = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_event_unlock); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_event_unlock); __pyx_v_self->_event_unlock = Py_None; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">151</span>: self.queue = self._create_queue(items)</pre> <pre class='cython code score-17 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_create_queue);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_items) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_v_items); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 151, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->queue); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->queue); __pyx_v_self->queue = __pyx_t_6; __pyx_t_6 = 0; </pre><pre class="cython line score-0"> <span class="">152</span>: </pre> <pre class="cython line score-0"> <span class="">153</span>: @property</pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">154</span>: def maxsize(self):</pre> <pre class='cython code score-4 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_7maxsize_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_7maxsize_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_queue_5Queue_7maxsize___get__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_7maxsize___get__(struct __pyx_obj_6gevent_6_queue_Queue *__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._queue.Queue.maxsize.__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-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">155</span>: return self._maxsize if self._maxsize > 0 else None</pre> <pre class='cython code score-7 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); if (((__pyx_v_self->_maxsize > 0) != 0)) { __pyx_t_2 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_v_self->_maxsize);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); __pyx_t_1 = Py_None; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">156</span>: </pre> <pre class="cython line score-0"> <span class="">157</span>: @maxsize.setter</pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">158</span>: def maxsize(self, nv):</pre> <pre class='cython code score-3 '>/* Python wrapper */ static int __pyx_pw_6gevent_6_queue_5Queue_7maxsize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nv); /*proto*/ static int __pyx_pw_6gevent_6_queue_5Queue_7maxsize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_nv) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_7maxsize_2__set__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), ((PyObject *)__pyx_v_nv)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_6_queue_5Queue_7maxsize_2__set__(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_nv) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__set__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.maxsize.__set__", __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-0"> <span class="">159</span>: # QQQ make maxsize into a property with setter that schedules unlock if necessary</pre> <pre class="cython line score-8" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">160</span>: if nv is None or nv <= 0:</pre> <pre class='cython code score-8 '> __pyx_t_2 = (__pyx_v_nv == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = <span class='py_c_api'>PyObject_RichCompare</span>(__pyx_v_nv, __pyx_int_0, Py_LE); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 160, __pyx_L1_error)</span> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 160, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* … */ goto __pyx_L3; } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">161</span>: self._maxsize = -1</pre> <pre class='cython code score-0 '> __pyx_v_self->_maxsize = -1L; </pre><pre class="cython line score-0"> <span class="">162</span>: else:</pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">163</span>: self._maxsize = nv</pre> <pre class='cython code score-7 '> /*else*/ { __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyIndex_AsSsize_t</span>(__pyx_v_nv); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 163, __pyx_L1_error)</span> __pyx_v_self->_maxsize = __pyx_t_5; } __pyx_L3:; </pre><pre class="cython line score-0"> <span class="">164</span>: </pre> <pre class="cython line score-27" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">165</span>: def copy(self):</pre> <pre class='cython code score-27 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_2copy[] = "Queue.copy(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_3copy = {"copy", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_3copy, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_2copy}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("copy (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_2copy(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_2copy(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("copy", 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_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._queue.Queue.copy", __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, 165, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__11); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__11); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_copy, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__12));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_copy, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 165, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __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_queue_py, __pyx_n_s_copy, 165, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 165, __pyx_L1_error)</span> </pre><pre class="cython line score-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">166</span>: return type(self)(self.maxsize, self.queue)</pre> <pre class='cython code score-42 '> <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_maxsize);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __pyx_t_3 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(<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_t_2, __pyx_v_self->queue}; __pyx_t_1 = <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_1)) __PYX_ERR(0, 166, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_self->queue}; __pyx_t_1 = <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_1)) __PYX_ERR(0, 166, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 166, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (__pyx_t_4) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->queue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_self->queue); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self->queue); __pyx_t_2 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_3, __pyx_t_6, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">167</span>: </pre> <pre class="cython line score-43" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">168</span>: def _create_queue(self, items=()):</pre> <pre class='cython code score-43 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_5_create_queue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_4_create_queue[] = "Queue._create_queue(self, items=())"; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_5_create_queue = {"_create_queue", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_5Queue_5_create_queue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_5Queue_4_create_queue}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_5_create_queue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_items = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_create_queue (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_empty_tuple); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_items); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_create_queue") < 0)) <span class='error_goto'>__PYX_ERR(0, 168, __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_items = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("_create_queue", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 168, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue._create_queue", __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_queue_5Queue_4_create_queue(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), __pyx_v_items); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_4_create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_items) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_create_queue", 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._queue.Queue._create_queue", __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__13 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_items);<span class='error_goto'> if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 168, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__13); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__13); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_5_create_queue, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__create_queue, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__14));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 168, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_create_queue, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 168, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__14 = (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__13, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_create_queue, 168, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 168, __pyx_L1_error)</span> </pre><pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">169</span>: return collections.deque(items)</pre> <pre class='cython code score-20 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_collections);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_deque);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __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 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_items) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_v_items); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 169, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">170</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">171</span>: def _get(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_7_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue__get(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_get", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __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_queue_5Queue_7_get)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 171, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_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._queue.Queue._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_queue_5Queue_7_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_6_get[] = "Queue._get(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_7_get = {"_get", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_7_get, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_6_get}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_7_get(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 (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_6_get(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_6_get(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { 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_1 = __pyx_f_6gevent_6_queue_5Queue__get(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __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._queue.Queue._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__15 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 171, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__15); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__15); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_7_get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__get, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__16));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 171, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_get, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 171, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__16 = (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__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get, 171, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 171, __pyx_L1_error)</span> </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">172</span>: return self.queue.popleft()</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>(__pyx_v_self->queue, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 172, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">173</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">174</span>: def _peek(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_9_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue__peek(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_peek", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_peek);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __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_queue_5Queue_9_peek)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 174, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_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._queue.Queue._peek", __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_queue_5Queue_9_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_8_peek[] = "Queue._peek(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_9_peek = {"_peek", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_9_peek, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_8_peek}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_9_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_peek (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_8_peek(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_8_peek(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_peek", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_5Queue__peek(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __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._queue.Queue._peek", __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__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, 174, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__17); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__17); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_9_peek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__peek, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__18));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 174, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_peek, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 174, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __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_queue_py, __pyx_n_s_peek, 174, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 174, __pyx_L1_error)</span> </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">175</span>: return self.queue[0]</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_GetItemInt</span>(__pyx_v_self->queue, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">176</span>: </pre> <pre class="cython line score-61" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">177</span>: def _put(self, item):</pre> <pre class='cython code score-61 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_11_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue__put(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_put);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __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_queue_5Queue_11_put)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_v_item); <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, 177, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue._put", __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_queue_5Queue_11_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_10_put[] = "Queue._put(self, item)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_11_put = {"_put", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_11_put, METH_O, __pyx_doc_6gevent_6_queue_5Queue_10_put}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_11_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_10_put(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_10_put(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_5Queue__put(__pyx_v_self, __pyx_v_item, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 177, __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._queue.Queue._put", __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__19 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_item);<span class='error_goto'> if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 177, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__19); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__19); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_11_put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__put, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__20));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_put, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 177, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__20 = (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__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put, 177, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 177, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">178</span>: self.queue.append(item)</pre> <pre class='cython code score-2 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_v_self->queue, __pyx_v_item);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 178, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">179</span>: </pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">180</span>: def __repr__(self):</pre> <pre class='cython code score-7 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_13__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_13__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_12__repr__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_12__repr__(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-37" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">181</span>: return '<%s at %s%s>' % (type(self).__name__, hex(id(self)), self._format())</pre> <pre class='cython code score-37 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_id, ((PyObject *)__pyx_v_self));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_hex, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __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_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_format);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 181, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 1, __pyx_t_3); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 2, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_s_at_s_s, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">182</span>: </pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">183</span>: def __str__(self):</pre> <pre class='cython code score-6 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_15__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_15__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_queue_5Queue_14__str__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_14__str__(struct __pyx_obj_6gevent_6_queue_Queue *__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_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.__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-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">184</span>: return '<%s%s>' % (type(self).__name__, self._format())</pre> <pre class='cython code score-31 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_format);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 184, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_s_s, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __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; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">185</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">186</span>: def _format(self):</pre> <pre class='cython code score-25 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_17_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_16_format[] = "Queue._format(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_17_format = {"_format", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_17_format, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_16_format}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_17_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_format (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_16_format(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_16_format(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_format", 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_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue._format", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__21 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_result);<span class='error_goto'> if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 186, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__21); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__21); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_17_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__format, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__22));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 186, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 186, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__22 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_format, 186, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 186, __pyx_L1_error)</span> </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">187</span>: result = []</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='py_c_api'>PyList_New</span>(0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_result = ((PyObject*)__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="">188</span>: if self.maxsize is not None:</pre> <pre class='cython code score-3 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_maxsize);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 != Py_None); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* … */ } </pre><pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">189</span>: result.append('maxsize=%r' % (self.maxsize, ))</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_maxsize);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_maxsize_r, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __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_4); __pyx_t_4 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_result, __pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 189, __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-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">190</span>: if getattr(self, 'queue', None):</pre> <pre class='cython code score-3 '> __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_queue, Py_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); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 190, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* … */ } </pre><pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">191</span>: result.append('queue=%r' % (self.queue, ))</pre> <pre class='cython code score-13 '> __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->queue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_self->queue); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_v_self->queue); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_queue_r, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 191, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_result, __pyx_t_4);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 191, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">192</span>: if self.getters:</pre> <pre class='cython code score-2 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 192, __pyx_L1_error)</span> if (__pyx_t_3) { /* … */ } </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">193</span>: result.append('getters[%s]' % len(self.getters))</pre> <pre class='cython code score-18 '> __pyx_t_4 = __pyx_v_self->getters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); __pyx_t_6 = <span class='py_c_api'>PyObject_Length</span>(__pyx_t_4);<span class='error_goto'> if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 193, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_getters_s, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_result, __pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 193, __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-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">194</span>: if self.putters:</pre> <pre class='cython code score-2 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_3 < 0)) <span class='error_goto'>__PYX_ERR(0, 194, __pyx_L1_error)</span> if (__pyx_t_3) { /* … */ } </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">195</span>: result.append('putters[%s]' % len(self.putters))</pre> <pre class='cython code score-18 '> __pyx_t_1 = __pyx_v_self->putters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_6 = <span class='py_c_api'>PyObject_Length</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 195, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_putters_s, __pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyList_Append</span>(__pyx_v_result, __pyx_t_4);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 195, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">196</span>: if result:</pre> <pre class='cython code score-1 '> __pyx_t_3 = (<span class='py_macro_api'>PyList_GET_SIZE</span>(__pyx_v_result) != 0); if (__pyx_t_3) { /* … */ } </pre><pre class="cython line score-9" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">197</span>: return ' ' + ' '.join(result)</pre> <pre class='cython code score-9 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyString_Join</span>(__pyx_kp_s__2, __pyx_v_result);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_1 = <span class='py_c_api'>PyNumber_Add</span>(__pyx_kp_s__2, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 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="">198</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_kp_s__3); __pyx_r = __pyx_kp_s__3; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">199</span>: </pre> <pre class="cython line score-74" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">200</span>: def qsize(self):</pre> <pre class='cython code score-74 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_19qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static Py_ssize_t __pyx_f_6gevent_6_queue_5Queue_qsize(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch) { Py_ssize_t __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("qsize", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_qsize);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __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_queue_5Queue_19qsize)) { <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 200, __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_PyIndex_AsSsize_t</span>(__pyx_t_2); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 200, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("gevent._queue.Queue.qsize", __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_queue_5Queue_19qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_18qsize[] = "Queue.qsize(self) -> Py_ssize_t\nReturn the size of the queue."; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_19qsize = {"qsize", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_19qsize, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_18qsize}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_19qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("qsize (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_18qsize(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_18qsize(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("qsize", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_f_6gevent_6_queue_5Queue_qsize(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __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._queue.Queue.qsize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__23 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 200, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__23); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__23); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_19qsize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_qsize, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__24));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 200, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_qsize, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 200, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__24 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_qsize, 200, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 200, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">201</span>: """Return the size of the queue."""</pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">202</span>: return len(self.queue)</pre> <pre class='cython code score-7 '> __pyx_t_1 = __pyx_v_self->queue; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_5 = <span class='py_c_api'>PyObject_Length</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 202, __pyx_L1_error)</span> <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"> <span class="">203</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">204</span>: def __len__(self):</pre> <pre class='cython code score-0 '>/* Python wrapper */ static Py_ssize_t __pyx_pw_6gevent_6_queue_5Queue_21__len__(PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_20__len__[] = "\n Return the size of the queue. This is the same as :meth:`qsize`.\n\n .. versionadded: 1.1b3\n\n Previously, getting len() of a queue would raise a TypeError.\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6gevent_6_queue_5Queue_20__len__; #endif static Py_ssize_t __pyx_pw_6gevent_6_queue_5Queue_21__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_20__len__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static Py_ssize_t __pyx_pf_6gevent_6_queue_5Queue_20__len__(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { Py_ssize_t __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__len__", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">205</span>: """</pre> <pre class="cython line score-0"> <span class="">206</span>: Return the size of the queue. This is the same as :meth:`qsize`.</pre> <pre class="cython line score-0"> <span class="">207</span>: </pre> <pre class="cython line score-0"> <span class="">208</span>: .. versionadded: 1.1b3</pre> <pre class="cython line score-0"> <span class="">209</span>: </pre> <pre class="cython line score-0"> <span class="">210</span>: Previously, getting len() of a queue would raise a TypeError.</pre> <pre class="cython line score-0"> <span class="">211</span>: """</pre> <pre class="cython line score-0"> <span class="">212</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">213</span>: return self.qsize()</pre> <pre class='cython code score-0 '> __pyx_r = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">214</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">215</span>: def __bool__(self):</pre> <pre class='cython code score-0 '>/* Python wrapper */ static int __pyx_pw_6gevent_6_queue_5Queue_23__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6gevent_6_queue_5Queue_23__bool__(PyObject *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_22__bool__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_6_queue_5Queue_22__bool__(CYTHON_UNUSED struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__bool__", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">216</span>: """</pre> <pre class="cython line score-0"> <span class="">217</span>: A queue object is always True.</pre> <pre class="cython line score-0"> <span class="">218</span>: </pre> <pre class="cython line score-0"> <span class="">219</span>: .. versionadded: 1.1b3</pre> <pre class="cython line score-0"> <span class="">220</span>: </pre> <pre class="cython line score-0"> <span class="">221</span>: Now that queues support len(), they need to implement ``__bool__``</pre> <pre class="cython line score-0"> <span class="">222</span>: to return True for backwards compatibility.</pre> <pre class="cython line score-0"> <span class="">223</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">224</span>: return True</pre> <pre class='cython code score-0 '> __pyx_r = 1; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">225</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">226</span>: def __nonzero__(self):</pre> <pre class='cython code score-0 '>/* Python wrapper */ static int __pyx_pw_6gevent_6_queue_5Queue_25__nonzero__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6gevent_6_queue_5Queue_25__nonzero__(PyObject *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__nonzero__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_24__nonzero__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_6_queue_5Queue_24__nonzero__(CYTHON_UNUSED struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__nonzero__", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">227</span>: # Py2.</pre> <pre class="cython line score-0"> <span class="">228</span>: # For Cython; __bool__ becomes a special method that we can't</pre> <pre class="cython line score-0"> <span class="">229</span>: # get by name.</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">230</span>: return True</pre> <pre class='cython code score-0 '> __pyx_r = 1; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">231</span>: </pre> <pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">232</span>: def empty(self):</pre> <pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_27empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static int __pyx_f_6gevent_6_queue_5Queue_empty(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("empty", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_empty);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __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_queue_5Queue_27empty)) { <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 232, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 232, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("gevent._queue.Queue.empty", __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_queue_5Queue_27empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_26empty[] = "Queue.empty(self) -> bool\nReturn ``True`` if the queue is empty, ``False`` otherwise."; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_27empty = {"empty", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_27empty, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_26empty}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_27empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("empty (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_26empty(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_26empty(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("empty", 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_queue_5Queue_empty(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __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._queue.Queue.empty", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__25 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 232, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__25); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__25); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_27empty, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_empty, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__26));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_empty, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 232, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__26 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_empty, 232, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 232, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">233</span>: """Return ``True`` if the queue is empty, ``False`` otherwise."""</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">234</span>: return not self.qsize()</pre> <pre class='cython code score-0 '> __pyx_r = (!(((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0)); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">235</span>: </pre> <pre class="cython line score-71" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">236</span>: def full(self):</pre> <pre class='cython code score-71 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_29full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static int __pyx_f_6gevent_6_queue_5Queue_full(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("full", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_full);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __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_queue_5Queue_29full)) { <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 236, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 236, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_WriteUnraisable</span>("gevent._queue.Queue.full", __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_queue_5Queue_29full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_28full[] = "Queue.full(self) -> bool\nReturn ``True`` if the queue is full, ``False`` otherwise.\n\n ``Queue(None)`` is never full.\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_29full = {"full", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_29full, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_28full}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_29full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("full (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_28full(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_28full(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("full", 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_queue_5Queue_full(__pyx_v_self, 1));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __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._queue.Queue.full", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__27 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 236, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__27); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__27); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_29full, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_full, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__28));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_full, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 236, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__28 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_full, 236, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 236, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">237</span>: """Return ``True`` if the queue is full, ``False`` otherwise.</pre> <pre class="cython line score-0"> <span class="">238</span>: </pre> <pre class="cython line score-0"> <span class="">239</span>: ``Queue(None)`` is never full.</pre> <pre class="cython line score-0"> <span class="">240</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">241</span>: return self._maxsize > 0 and self.qsize() >= self._maxsize</pre> <pre class='cython code score-0 '> __pyx_t_6 = ((__pyx_v_self->_maxsize > 0) != 0); if (__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L3_bool_binop_done; } __pyx_t_6 = ((((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) >= __pyx_v_self->_maxsize) != 0); __pyx_t_5 = __pyx_t_6; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_5; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">242</span>: </pre> <pre class="cython line score-118" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">243</span>: def put(self, item, block=True, timeout=None):</pre> <pre class='cython code score-118 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_31put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue_put(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_5Queue_put *__pyx_optional_args) { PyObject *__pyx_v_block = ((PyObject *)Py_True); PyObject *__pyx_v_timeout = ((PyObject *)Py_None); PyObject *__pyx_v_getter = NULL; struct __pyx_obj_6gevent_6_queue_ItemWaiter *__pyx_v_waiter = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_block = __pyx_optional_args->block; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_timeout = __pyx_optional_args->timeout; } } } <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_timeout); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_put_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __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_queue_5Queue_31put)) { <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 && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_item, __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, 3+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __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[4] = {__pyx_t_4, __pyx_v_item, __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, 3+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __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>(3+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __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_item); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_item); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0+__pyx_t_5, __pyx_v_item); <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, 1+__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, 2+__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, 243, __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 && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_getter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_waiter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_timeout); <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_queue_5Queue_31put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_30put[] = "Queue.put(self, item, block=True, timeout=None)\nPut an item into the queue.\n\n If optional arg *block* is true and *timeout* is ``None`` (the default),\n block if necessary until a free slot is available. If *timeout* is\n a positive number, it blocks at most *timeout* seconds and raises\n the :class:`Full` exception if no free slot was available within that time.\n Otherwise (*block* is false), put an item on the queue if a free slot\n is immediately available, else raise the :class:`Full` exception (*timeout*\n is ignored in that case).\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_31put = {"put", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_5Queue_31put, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_5Queue_30put}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_31put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_item = 0; PyObject *__pyx_v_block = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_True); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_item)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) <span class='error_goto'>__PYX_ERR(0, 243, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_item = values[0]; __pyx_v_block = values[1]; __pyx_v_timeout = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("put", 0, 1, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 243, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.put", __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_queue_5Queue_30put(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), __pyx_v_item, __pyx_v_block, __pyx_v_timeout); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_30put(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put", 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_queue_Queue->put(__pyx_v_self, __pyx_v_item, 1, &__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __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._queue.Queue.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__29 = <span class='py_c_api'>PyTuple_Pack</span>(4, __pyx_n_s_self, __pyx_n_s_item, __pyx_n_s_block, __pyx_n_s_timeout);<span class='error_goto'> if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 243, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__29); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__29); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_31put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_put, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__30));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_put_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 243, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__30 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_2, 243, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 243, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">244</span>: """Put an item into the queue.</pre> <pre class="cython line score-0"> <span class="">245</span>: </pre> <pre class="cython line score-0"> <span class="">246</span>: If optional arg *block* is true and *timeout* is ``None`` (the default),</pre> <pre class="cython line score-0"> <span class="">247</span>: block if necessary until a free slot is available. If *timeout* is</pre> <pre class="cython line score-0"> <span class="">248</span>: a positive number, it blocks at most *timeout* seconds and raises</pre> <pre class="cython line score-0"> <span class="">249</span>: the :class:`Full` exception if no free slot was available within that time.</pre> <pre class="cython line score-0"> <span class="">250</span>: Otherwise (*block* is false), put an item on the queue if a free slot</pre> <pre class="cython line score-0"> <span class="">251</span>: is immediately available, else raise the :class:`Full` exception (*timeout*</pre> <pre class="cython line score-0"> <span class="">252</span>: is ignored in that case).</pre> <pre class="cython line score-0"> <span class="">253</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">254</span>: if self._maxsize == -1 or self.qsize() < self._maxsize:</pre> <pre class='cython code score-0 '> __pyx_t_8 = ((__pyx_v_self->_maxsize == -1L) != 0); if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L4_bool_binop_done; } __pyx_t_8 = ((((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) < __pyx_v_self->_maxsize) != 0); __pyx_t_7 = __pyx_t_8; __pyx_L4_bool_binop_done:; if (__pyx_t_7) { /* … */ goto __pyx_L3; } </pre><pre class="cython line score-0"> <span class="">255</span>: # there's a free slot, put an item right away</pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">256</span>: self._put(item)</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_put(__pyx_v_self, __pyx_v_item, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __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-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">257</span>: if self.getters:</pre> <pre class='cython code score-2 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_7 < 0)) <span class='error_goto'>__PYX_ERR(0, 257, __pyx_L1_error)</span> if (__pyx_t_7) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">258</span>: self._schedule_unlock()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __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-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">259</span>: elif self.hub is getcurrent():</pre> <pre class='cython code score-19 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_getcurrent);<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 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <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, 259, __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_7 = (__pyx_v_self->hub == __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-0"> <span class="">260</span>: # We're in the mainloop, so we cannot wait; we can switch to other greenlets though.</pre> <pre class="cython line score-0"> <span class="">261</span>: # Check if possible to get a free slot in the queue.</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">262</span>: while self.getters and self.qsize() and self.qsize() >= self._maxsize:</pre> <pre class='cython code score-2 '> while (1) { __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_7 < 0)) <span class='error_goto'>__PYX_ERR(0, 262, __pyx_L1_error)</span> if (__pyx_t_7) { } else { __pyx_t_8 = __pyx_t_7; goto __pyx_L9_bool_binop_done; } __pyx_t_7 = (((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0); if (__pyx_t_7) { } else { __pyx_t_8 = __pyx_t_7; goto __pyx_L9_bool_binop_done; } __pyx_t_7 = ((((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) >= __pyx_v_self->_maxsize) != 0); __pyx_t_8 = __pyx_t_7; __pyx_L9_bool_binop_done:; if (!__pyx_t_8) break; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">263</span>: getter = self.getters.popleft()</pre> <pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->getters, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 263, __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_XDECREF_SET</span>(__pyx_v_getter, __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="">264</span>: getter.switch(getter)</pre> <pre class='cython code score-17 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_getter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_getter) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_v_getter); <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, 264, __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="">265</span>: if self.qsize() < self._maxsize:</pre> <pre class='cython code score-0 '> __pyx_t_8 = ((((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) < __pyx_v_self->_maxsize) != 0); if (__pyx_t_8) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">266</span>: self._put(item)</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_put(__pyx_v_self, __pyx_v_item, 0);<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_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="">267</span>: return</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">268</span>: raise Full</pre> <pre class='cython code score-5 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_Full);<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); <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, 268, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">269</span>: elif 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 < 0)) <span class='error_goto'>__PYX_ERR(0, 269, __pyx_L1_error)</span> if (likely(__pyx_t_8)) { /* … */ goto __pyx_L3; } </pre><pre class="cython line score-12" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">270</span>: waiter = ItemWaiter(item, self)</pre> <pre class='cython code score-12 '> __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_item); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_item); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_v_item); <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_1, 1, ((PyObject *)__pyx_v_self)); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(((PyObject *)__pyx_ptype_6gevent_6_queue_ItemWaiter), __pyx_t_1, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __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_waiter = ((struct __pyx_obj_6gevent_6_queue_ItemWaiter *)__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="">271</span>: self.putters.append(waiter)</pre> <pre class='cython code score-2 '> __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_v_self->putters, ((PyObject *)__pyx_v_waiter));<span class='error_goto'> if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 271, __pyx_L1_error)</span> </pre><pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">272</span>: timeout = Timeout._start_new_or_dummy(timeout, Full)</pre> <pre class='cython code score-46 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_Timeout);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_1, __pyx_n_s_start_new_or_dummy);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __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_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_Full);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_timeout, __pyx_t_1}; __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, 272, __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_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_timeout, __pyx_t_1}; __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, 272, __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_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; } else #endif { __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); if (__pyx_t_6) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; } <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_4, 0+__pyx_t_5, __pyx_v_timeout); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 1+__pyx_t_5, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_3, __pyx_t_4, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_timeout, __pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">273</span>: try:</pre> <pre class='cython code score-0 '> /*try:*/ { </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">274</span>: if self.getters:</pre> <pre class='cython code score-2 '> __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_8 < 0)) <span class='error_goto'>__PYX_ERR(0, 274, __pyx_L14_error)</span> if (__pyx_t_8) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">275</span>: self._schedule_unlock()</pre> <pre class='cython code score-1 '> __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L14_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">276</span>: result = waiter.get()</pre> <pre class='cython code score-0 '> __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_6_queue_ItemWaiter *)__pyx_v_waiter->__pyx_base.__pyx_vtab)->__pyx_base.get(((struct __pyx_obj_6gevent_8__waiter_Waiter *)__pyx_v_waiter), 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 276, __pyx_L14_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">277</span>: if result is not waiter:</pre> <pre class='cython code score-0 '> __pyx_t_8 = (__pyx_v_result != ((PyObject *)__pyx_v_waiter)); __pyx_t_7 = (__pyx_t_8 != 0); if (unlikely(__pyx_t_7)) { /* … */ } } </pre><pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">278</span>: raise InvalidSwitchError("Invalid switch into Queue.put: %r" % (result, ))</pre> <pre class='cython code score-30 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_InvalidSwitchError);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 278, __pyx_L14_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 278, __pyx_L14_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_result); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_v_result); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Invalid_switch_into_Queue_put_r, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L14_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 278, __pyx_L14_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='error_goto'>__PYX_ERR(0, 278, __pyx_L14_error)</span> </pre><pre class="cython line score-0"> <span class="">279</span>: finally:</pre> <pre class="cython line score-38" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">280</span>: timeout.cancel()</pre> <pre class='cython code score-38 '> /*finally:*/ { /*normal exit:*/{ __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_timeout, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 280, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 280, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; /* … */ __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_timeout, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L19_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 280, __pyx_L19_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; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">281</span>: _safe_remove(self.putters, waiter)</pre> <pre class='cython code score-26 '> __pyx_t_2 = __pyx_v_self->putters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_3 = __pyx_f_6gevent_6_queue__safe_remove(__pyx_t_2, ((PyObject *)__pyx_v_waiter));<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __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; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L15; } __pyx_L14_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_17); __pyx_t_5 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { /* … */ __pyx_t_3 = __pyx_v_self->putters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); __pyx_t_2 = __pyx_f_6gevent_6_queue__safe_remove(__pyx_t_3, ((PyObject *)__pyx_v_waiter));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L19_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_16, __pyx_t_17); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L1_error; __pyx_L19_error:; if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_16, __pyx_t_17); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); __pyx_t_13 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; goto __pyx_L1_error; } __pyx_L15:; } </pre><pre class="cython line score-0"> <span class="">282</span>: else:</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">283</span>: raise Full</pre> <pre class='cython code score-5 '> /*else*/ { <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_Full);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='error_goto'>__PYX_ERR(0, 283, __pyx_L1_error)</span> } __pyx_L3:; </pre><pre class="cython line score-0"> <span class="">284</span>: </pre> <pre class="cython line score-61" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">285</span>: def put_nowait(self, item):</pre> <pre class='cython code score-61 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_33put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue_put_nowait(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put_nowait", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_put_nowait);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __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_queue_5Queue_33put_nowait)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_v_item); <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, 285, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.put_nowait", __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_queue_5Queue_33put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_32put_nowait[] = "Queue.put_nowait(self, item)\nPut an item into the queue without blocking.\n\n Only enqueue the item if a free slot is immediately available.\n Otherwise raise the :class:`Full` exception.\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_33put_nowait = {"put_nowait", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_33put_nowait, METH_O, __pyx_doc_6gevent_6_queue_5Queue_32put_nowait}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_33put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put_nowait (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_32put_nowait(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_32put_nowait(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put_nowait", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_5Queue_put_nowait(__pyx_v_self, __pyx_v_item, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __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._queue.Queue.put_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__31 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_item);<span class='error_goto'> if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 285, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__31); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__31); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_33put_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_put_nowait, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__32));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_put_nowait, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 285, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__32 = (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__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_nowait, 285, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 285, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">286</span>: """Put an item into the queue without blocking.</pre> <pre class="cython line score-0"> <span class="">287</span>: </pre> <pre class="cython line score-0"> <span class="">288</span>: Only enqueue the item if a free slot is immediately available.</pre> <pre class="cython line score-0"> <span class="">289</span>: Otherwise raise the :class:`Full` exception.</pre> <pre class="cython line score-0"> <span class="">290</span>: """</pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">291</span>: self.put(item, False)</pre> <pre class='cython code score-1 '> __pyx_t_5.__pyx_n = 1; __pyx_t_5.block = Py_False; __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->put(__pyx_v_self, __pyx_v_item, 0, &__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">292</span>: </pre> <pre class="cython line score-11" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">293</span>: def __get_or_peek(self, method, block, timeout):</pre> <pre class='cython code score-11 '>static PyObject *__pyx_f_6gevent_6_queue_5Queue___get_or_peek(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) { struct __pyx_obj_6gevent_8__waiter_Waiter *__pyx_v_waiter = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__get_or_peek", 0); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_timeout); /* … */ /* 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_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.__get_or_peek", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_waiter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_timeout); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">294</span>: # Internal helper method. The `method` should be either</pre> <pre class="cython line score-0"> <span class="">295</span>: # self._get when called from self.get() or self._peek when</pre> <pre class="cython line score-0"> <span class="">296</span>: # called from self.peek(). Call this after the initial check</pre> <pre class="cython line score-0"> <span class="">297</span>: # to see if there are items in the queue.</pre> <pre class="cython line score-0"> <span class="">298</span>: </pre> <pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">299</span>: if self.hub is getcurrent():</pre> <pre class='cython code score-19 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_getcurrent);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <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, 299, __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 = (__pyx_v_self->hub == __pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* … */ } </pre><pre class="cython line score-0"> <span class="">300</span>: # special case to make get_nowait() or peek_nowait() runnable in the mainloop greenlet</pre> <pre class="cython line score-0"> <span class="">301</span>: # there are no items in the queue; try to fix the situation by unlocking putters</pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">302</span>: while self.putters:</pre> <pre class='cython code score-2 '> while (1) { __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_5 < 0)) <span class='error_goto'>__PYX_ERR(0, 302, __pyx_L1_error)</span> if (!__pyx_t_5) break; </pre><pre class="cython line score-0"> <span class="">303</span>: # Note: get() used popleft(), peek used pop(); popleft</pre> <pre class="cython line score-0"> <span class="">304</span>: # is almost certainly correct.</pre> <pre class="cython line score-38" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">305</span>: self.putters.popleft().put_and_switch()</pre> <pre class='cython code score-38 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->putters, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_6) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_6) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 305, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_put_and_switch);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __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 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 305, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='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="">306</span>: if self.qsize():</pre> <pre class='cython code score-0 '> __pyx_t_5 = (((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0); if (__pyx_t_5) { /* … */ } } </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">307</span>: return method()</pre> <pre class='cython code score-18 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_method); __pyx_t_3 = __pyx_v_method; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 307, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">308</span>: raise Empty()</pre> <pre class='cython code score-21 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_Empty);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 308, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='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, 308, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">309</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">310</span>: if not block:</pre> <pre class='cython code score-2 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_block); if (unlikely(__pyx_t_5 < 0)) <span class='error_goto'>__PYX_ERR(0, 310, __pyx_L1_error)</span> __pyx_t_4 = ((!__pyx_t_5) != 0); if (unlikely(__pyx_t_4)) { /* … */ } </pre><pre class="cython line score-0"> <span class="">311</span>: # We can't block, we're not the hub, and we have nothing</pre> <pre class="cython line score-0"> <span class="">312</span>: # to return. No choice...</pre> <pre class="cython line score-21" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">313</span>: raise Empty()</pre> <pre class='cython code score-21 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_Empty);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 313, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='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, 313, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">314</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">315</span>: waiter = Waiter() # pylint:disable=undefined-variable</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(((PyObject *)__pyx_ptype_6gevent_8__waiter_Waiter));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_waiter = ((struct __pyx_obj_6gevent_8__waiter_Waiter *)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">316</span>: timeout = Timeout._start_new_or_dummy(timeout, Empty)</pre> <pre class='cython code score-46 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_Timeout);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_start_new_or_dummy);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_Empty);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && unlikely(<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_v_timeout, __pyx_t_3}; __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, 316, __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; } 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_v_timeout, __pyx_t_3}; __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, 316, __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; } 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, 316, __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='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_8, 0+__pyx_t_7, __pyx_v_timeout); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3); __pyx_t_3 = 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, 316, __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_SET</span>(__pyx_v_timeout, __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="">317</span>: try:</pre> <pre class='cython code score-0 '> /*try:*/ { </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">318</span>: self.getters.append(waiter)</pre> <pre class='cython code score-2 '> __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_v_self->getters, ((PyObject *)__pyx_v_waiter));<span class='error_goto'> if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 318, __pyx_L9_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">319</span>: if self.putters:</pre> <pre class='cython code score-2 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_4 < 0)) <span class='error_goto'>__PYX_ERR(0, 319, __pyx_L9_error)</span> if (__pyx_t_4) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">320</span>: self._schedule_unlock()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L9_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" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">321</span>: result = waiter.get()</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_8__waiter_Waiter *)__pyx_v_waiter->__pyx_vtab)->get(__pyx_v_waiter, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_result = __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="">322</span>: if result is not waiter:</pre> <pre class='cython code score-0 '> __pyx_t_4 = (__pyx_v_result != ((PyObject *)__pyx_v_waiter)); __pyx_t_5 = (__pyx_t_4 != 0); if (unlikely(__pyx_t_5)) { /* … */ } </pre><pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">323</span>: raise InvalidSwitchError('Invalid switch into Queue.get: %r' % (result, ))</pre> <pre class='cython code score-30 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_InvalidSwitchError);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 323, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_8 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 323, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_result); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_8, 0, __pyx_v_result); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Invalid_switch_into_Queue_get_r, __pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_8 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_8)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __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_8); __pyx_t_8 = 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, 323, __pyx_L9_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, 323, __pyx_L9_error)</span> </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">324</span>: return method()</pre> <pre class='cython code score-18 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_method); __pyx_t_2 = __pyx_v_method; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <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, 324, __pyx_L9_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_L8_return; } </pre><pre class="cython line score-0"> <span class="">325</span>: finally:</pre> <pre class="cython line score-49" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">326</span>: timeout.cancel()</pre> <pre class='cython code score-49 '> /*finally:*/ { __pyx_L9_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_14); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_17); __pyx_t_7 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_11 = __pyx_filename; { __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_timeout, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L14_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 326, __pyx_L14_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; /* … */ __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_timeout, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_1))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_1, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 326, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">327</span>: _safe_remove(self.getters, waiter)</pre> <pre class='cython code score-15 '> __pyx_t_1 = __pyx_v_self->getters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_2 = __pyx_f_6gevent_6_queue__safe_remove(__pyx_t_1, ((PyObject *)__pyx_v_waiter));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L14_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_16, __pyx_t_17); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_13); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_14); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_12, __pyx_t_13, __pyx_t_14); __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_11; goto __pyx_L1_error; __pyx_L14_error:; if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_16, __pyx_t_17); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_13); __pyx_t_13 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; goto __pyx_L1_error; } __pyx_L8_return: { __pyx_t_17 = __pyx_r; __pyx_r = 0; /* … */ __pyx_t_2 = __pyx_v_self->getters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_1 = __pyx_f_6gevent_6_queue__safe_remove(__pyx_t_2, ((PyObject *)__pyx_v_waiter));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __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; __pyx_r = __pyx_t_17; __pyx_t_17 = 0; goto __pyx_L0; } } </pre><pre class="cython line score-0"> <span class="">328</span>: </pre> <pre class="cython line score-106" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">329</span>: def get(self, block=True, timeout=None):</pre> <pre class='cython code score-106 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_35get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue_get(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_5Queue_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->__pyx_n > 0) { __pyx_v_block = __pyx_optional_args->block; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_timeout = __pyx_optional_args->timeout; } } } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __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_queue_5Queue_35get)) { <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 && 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, 329, __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, 329, __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, 329, __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, 329, __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 && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.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_queue_5Queue_35get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_34get[] = "Queue.get(self, block=True, timeout=None)\nRemove and return an item from the queue.\n\n If optional args *block* is true and *timeout* is ``None`` (the default),\n block if necessary until an item is available. If *timeout* is a positive number,\n it blocks at most *timeout* seconds and raises the :class:`Empty` exception\n if no item was available within that time. Otherwise (*block* is false), return\n an item if one is immediately available, else raise the :class:`Empty` exception\n (*timeout* is ignored in that case).\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_35get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_5Queue_35get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_5Queue_34get}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_35get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_block = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_True); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) <span class='error_goto'>__PYX_ERR(0, 329, __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, 329, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.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_queue_5Queue_34get(((struct __pyx_obj_6gevent_6_queue_Queue *)__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_queue_5Queue_34get(struct __pyx_obj_6gevent_6_queue_Queue *__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_queue_Queue->get(__pyx_v_self, 1, &__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __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._queue.Queue.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__33 = <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__33)) __PYX_ERR(0, 329, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__33); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__33); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_35get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_get, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__34));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 329, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_get_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 329, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__34 = (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__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get_2, 329, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 329, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">330</span>: """Remove and return an item from the queue.</pre> <pre class="cython line score-0"> <span class="">331</span>: </pre> <pre class="cython line score-0"> <span class="">332</span>: If optional args *block* is true and *timeout* is ``None`` (the default),</pre> <pre class="cython line score-0"> <span class="">333</span>: block if necessary until an item is available. If *timeout* is a positive number,</pre> <pre class="cython line score-0"> <span class="">334</span>: it blocks at most *timeout* seconds and raises the :class:`Empty` exception</pre> <pre class="cython line score-0"> <span class="">335</span>: if no item was available within that time. Otherwise (*block* is false), return</pre> <pre class="cython line score-0"> <span class="">336</span>: an item if one is immediately available, else raise the :class:`Empty` exception</pre> <pre class="cython line score-0"> <span class="">337</span>: (*timeout* is ignored in that case).</pre> <pre class="cython line score-0"> <span class="">338</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">339</span>: if self.qsize():</pre> <pre class='cython code score-0 '> __pyx_t_7 = (((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0); if (__pyx_t_7) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">340</span>: if self.putters:</pre> <pre class='cython code score-2 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_7 < 0)) <span class='error_goto'>__PYX_ERR(0, 340, __pyx_L1_error)</span> if (__pyx_t_7) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">341</span>: self._schedule_unlock()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __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-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">342</span>: return self._get()</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_get(__pyx_v_self, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">343</span>: </pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">344</span>: return self.__get_or_peek(self._get, block, timeout)</pre> <pre class='cython code score-4 '> <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 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->__pyx___get_or_peek(__pyx_v_self, __pyx_t_1, __pyx_v_block, __pyx_v_timeout);<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); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">345</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">346</span>: def get_nowait(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_37get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue_get_nowait(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_nowait", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get_nowait);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __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_queue_5Queue_37get_nowait)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 346, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_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._queue.Queue.get_nowait", __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_queue_5Queue_37get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_36get_nowait[] = "Queue.get_nowait(self)\nRemove and return an item from the queue without blocking.\n\n Only get an item if one is immediately available. Otherwise\n raise the :class:`Empty` exception.\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_37get_nowait = {"get_nowait", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_37get_nowait, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_36get_nowait}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_37get_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_queue_5Queue_36get_nowait(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_36get_nowait(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_nowait", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_5Queue_get_nowait(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __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._queue.Queue.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__35 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 346, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__35); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__35); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_37get_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_get_nowait, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__36));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_get_nowait, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 346, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__36 = (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__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get_nowait, 346, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 346, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">347</span>: """Remove and return an item from the queue without blocking.</pre> <pre class="cython line score-0"> <span class="">348</span>: </pre> <pre class="cython line score-0"> <span class="">349</span>: Only get an item if one is immediately available. Otherwise</pre> <pre class="cython line score-0"> <span class="">350</span>: raise the :class:`Empty` exception.</pre> <pre class="cython line score-0"> <span class="">351</span>: """</pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">352</span>: return self.get(False)</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.block = Py_False; __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0, &__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">353</span>: </pre> <pre class="cython line score-106" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">354</span>: def peek(self, block=True, timeout=None):</pre> <pre class='cython code score-106 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_39peek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue_peek(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_5Queue_peek *__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>("peek", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { __pyx_v_block = __pyx_optional_args->block; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_timeout = __pyx_optional_args->timeout; } } } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_peek_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __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_queue_5Queue_39peek)) { <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 && 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, 354, __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, 354, __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, 354, __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, 354, __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 && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.peek", __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_queue_5Queue_39peek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_38peek[] = "Queue.peek(self, block=True, timeout=None)\nReturn an item from the queue without removing it.\n\n If optional args *block* is true and *timeout* is ``None`` (the default),\n block if necessary until an item is available. If *timeout* is a positive number,\n it blocks at most *timeout* seconds and raises the :class:`Empty` exception\n if no item was available within that time. Otherwise (*block* is false), return\n an item if one is immediately available, else raise the :class:`Empty` exception\n (*timeout* is ignored in that case).\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_39peek = {"peek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_5Queue_39peek, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_5Queue_38peek}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_39peek(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>("peek (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_True); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "peek") < 0)) <span class='error_goto'>__PYX_ERR(0, 354, __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>("peek", 0, 0, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 354, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue.peek", __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_queue_5Queue_38peek(((struct __pyx_obj_6gevent_6_queue_Queue *)__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_queue_5Queue_38peek(struct __pyx_obj_6gevent_6_queue_Queue *__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>("peek", 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_queue_Queue->peek(__pyx_v_self, 1, &__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __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._queue.Queue.peek", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__37 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self, __pyx_n_s_block, __pyx_n_s_timeout);<span class='error_goto'> if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 354, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__37); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__37); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_39peek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_peek, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__38));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 354, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_peek_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 354, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__38 = (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__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_peek_2, 354, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 354, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">355</span>: """Return an item from the queue without removing it.</pre> <pre class="cython line score-0"> <span class="">356</span>: </pre> <pre class="cython line score-0"> <span class="">357</span>: If optional args *block* is true and *timeout* is ``None`` (the default),</pre> <pre class="cython line score-0"> <span class="">358</span>: block if necessary until an item is available. If *timeout* is a positive number,</pre> <pre class="cython line score-0"> <span class="">359</span>: it blocks at most *timeout* seconds and raises the :class:`Empty` exception</pre> <pre class="cython line score-0"> <span class="">360</span>: if no item was available within that time. Otherwise (*block* is false), return</pre> <pre class="cython line score-0"> <span class="">361</span>: an item if one is immediately available, else raise the :class:`Empty` exception</pre> <pre class="cython line score-0"> <span class="">362</span>: (*timeout* is ignored in that case).</pre> <pre class="cython line score-0"> <span class="">363</span>: """</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">364</span>: if self.qsize():</pre> <pre class='cython code score-0 '> __pyx_t_7 = (((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0); if (__pyx_t_7) { /* … */ } </pre><pre class="cython line score-0"> <span class="">365</span>: # XXX: Why doesn't this schedule an unlock like get() does?</pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">366</span>: return self._peek()</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_peek(__pyx_v_self, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">367</span>: </pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">368</span>: return self.__get_or_peek(self._peek, block, timeout)</pre> <pre class='cython code score-4 '> <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_peek);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->__pyx___get_or_peek(__pyx_v_self, __pyx_t_1, __pyx_v_block, __pyx_v_timeout);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">369</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">370</span>: def peek_nowait(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_6_queue_5Queue_41peek_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_5Queue_peek_nowait(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("peek_nowait", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_peek_nowait);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __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_queue_5Queue_41peek_nowait)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 370, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_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._queue.Queue.peek_nowait", __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_queue_5Queue_41peek_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_40peek_nowait[] = "Queue.peek_nowait(self)\nReturn an item from the queue without blocking.\n\n Only return an item if one is immediately available. Otherwise\n raise the :class:`Empty` exception.\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_41peek_nowait = {"peek_nowait", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_41peek_nowait, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_40peek_nowait}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_41peek_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>("peek_nowait (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_40peek_nowait(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_40peek_nowait(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("peek_nowait", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_5Queue_peek_nowait(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __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._queue.Queue.peek_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__39 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 370, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__39); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__39); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_41peek_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue_peek_nowait, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__40));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 370, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_peek_nowait, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 370, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__40 = (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__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_peek_nowait, 370, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 370, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">371</span>: """Return an item from the queue without blocking.</pre> <pre class="cython line score-0"> <span class="">372</span>: </pre> <pre class="cython line score-0"> <span class="">373</span>: Only return an item if one is immediately available. Otherwise</pre> <pre class="cython line score-0"> <span class="">374</span>: raise the :class:`Empty` exception.</pre> <pre class="cython line score-0"> <span class="">375</span>: """</pre> <pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">376</span>: return self.peek(False)</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.block = Py_False; __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->peek(__pyx_v_self, 0, &__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">377</span>: </pre> <pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">378</span>: def _unlock(self):</pre> <pre class='cython code score-32 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_43_unlock(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_5Queue_42_unlock[] = "Queue._unlock(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_5Queue_43_unlock = {"_unlock", (PyCFunction)__pyx_pw_6gevent_6_queue_5Queue_43_unlock, METH_NOARGS, __pyx_doc_6gevent_6_queue_5Queue_42_unlock}; static PyObject *__pyx_pw_6gevent_6_queue_5Queue_43_unlock(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_unlock (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_42_unlock(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_42_unlock(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { int __pyx_v_repeat; PyObject *__pyx_v_putter = NULL; PyObject *__pyx_v_getter = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_unlock", 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_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue._unlock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_putter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_getter); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__41 = <span class='py_c_api'>PyTuple_Pack</span>(4, __pyx_n_s_self, __pyx_n_s_repeat, __pyx_n_s_putter, __pyx_n_s_getter);<span class='error_goto'> if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 378, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__41); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__41); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_5Queue_43_unlock, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Queue__unlock, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__42));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_unlock, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 378, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); __pyx_codeobj__42 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_unlock, 378, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 378, __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="">379</span>: while True:</pre> <pre class='cython code score-0 '> while (1) { </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">380</span>: repeat = False</pre> <pre class='cython code score-0 '> __pyx_v_repeat = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">381</span>: if self.putters and (self._maxsize == -1 or self.qsize() < self._maxsize):</pre> <pre class='cython code score-2 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 381, __pyx_L1_error)</span> if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } __pyx_t_2 = ((__pyx_v_self->_maxsize == -1L) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } __pyx_t_2 = ((((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) < __pyx_v_self->_maxsize) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">382</span>: repeat = True</pre> <pre class='cython code score-0 '> __pyx_v_repeat = 1; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">383</span>: try:</pre> <pre class='cython code score-4 '> { /*try:*/ { /* … */ } /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L10_exception_handled:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L16_try_end:; } </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">384</span>: putter = self.putters.popleft()</pre> <pre class='cython code score-19 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->putters, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 384, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_7))) { __pyx_t_8 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_7, function); } } __pyx_t_6 = (__pyx_t_8) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_7, __pyx_t_8) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 384, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_putter, __pyx_t_6); __pyx_t_6 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">385</span>: self._put(putter.item)</pre> <pre class='cython code score-4 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_putter, __pyx_n_s_item);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 385, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_7 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->_put(__pyx_v_self, __pyx_t_6, 0);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 385, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <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_7); __pyx_t_7 = 0; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">386</span>: except: # pylint:disable=bare-except</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue._unlock", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_7, &__pyx_t_6, &__pyx_t_8) < 0) <span class='error_goto'>__PYX_ERR(0, 386, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); </pre><pre class="cython line score-36" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">387</span>: putter.throw(*sys.exc_info())</pre> <pre class='cython code score-36 '> if (unlikely(!__pyx_v_putter)) { <span class='pyx_c_api'>__Pyx_RaiseUnboundLocalError</span>("putter"); <span class='error_goto'>__PYX_ERR(0, 387, __pyx_L11_except_error)</span> } __pyx_t_9 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_putter, __pyx_n_s_throw);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 387, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_11, __pyx_n_s_sys);<span class='error_goto'> if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 387, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_11); __pyx_t_12 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_11, __pyx_n_s_exc_info);<span class='error_goto'> if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 387, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_12))) { __pyx_t_11 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_12); if (likely(__pyx_t_11)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_11); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_12, function); } } __pyx_t_10 = (__pyx_t_11) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_12, __pyx_t_11) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_10)) <span class='error_goto'>__PYX_ERR(0, 387, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = <span class='pyx_c_api'>__Pyx_PySequence_Tuple</span>(__pyx_t_10);<span class='error_goto'> if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 387, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_12); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_9, __pyx_t_12, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 387, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_10); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_12); __pyx_t_12 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; </pre><pre class="cython line score-0"> <span class="">388</span>: else:</pre> <pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">389</span>: putter.switch(putter)</pre> <pre class='cython code score-23 '> /*else:*/ { __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_putter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 389, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_6))) { __pyx_t_8 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_6); if (likely(__pyx_t_8)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_6, function); } } __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_v_putter) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_6, __pyx_v_putter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) <span class='error_goto'>__PYX_ERR(0, 389, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <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_7); __pyx_t_7 = 0; } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L16_try_end; __pyx_L9_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_8); __pyx_t_8 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">390</span>: if self.getters and self.qsize():</pre> <pre class='cython code score-2 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 390, __pyx_L1_error)</span> if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L20_bool_binop_done; } __pyx_t_2 = (((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->qsize(__pyx_v_self, 0) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L20_bool_binop_done:; if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">391</span>: repeat = True</pre> <pre class='cython code score-0 '> __pyx_v_repeat = 1; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">392</span>: getter = self.getters.popleft()</pre> <pre class='cython code score-19 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->getters, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_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_8 = (__pyx_t_7) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_6, __pyx_t_7) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_8)) <span class='error_goto'>__PYX_ERR(0, 392, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_getter, __pyx_t_8); __pyx_t_8 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">393</span>: getter.switch(getter)</pre> <pre class='cython code score-17 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_getter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_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_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_getter) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_6, __pyx_v_getter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_8)) <span class='error_goto'>__PYX_ERR(0, 393, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_8); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_8); __pyx_t_8 = 0; </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">394</span>: if not repeat:</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((!(__pyx_v_repeat != 0)) != 0); if (__pyx_t_1) { /* … */ } } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">395</span>: return</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">396</span>: </pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">397</span>: def _schedule_unlock(self):</pre> <pre class='cython code score-7 '>static PyObject *__pyx_f_6gevent_6_queue_5Queue__schedule_unlock(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_schedule_unlock", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Queue._schedule_unlock", __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-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">398</span>: if not self._event_unlock:</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->_event_unlock); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 398, __pyx_L1_error)</span> __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">399</span>: self._event_unlock = self.hub.loop.run_callback(self._unlock)</pre> <pre class='cython code score-23 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->hub, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 399, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_unlock);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 399, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 399, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_event_unlock); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_event_unlock); __pyx_v_self->_event_unlock = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">400</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">401</span>: def __iter__(self):</pre> <pre class='cython code score-0 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_45__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_45__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_44__iter__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_44__iter__(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__iter__", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">402</span>: return self</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>(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">403</span>: </pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">404</span>: def __next__(self):</pre> <pre class='cython code score-4 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_47__next__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_5Queue_47__next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__next__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_5Queue_46__next__(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_5Queue_46__next__(struct __pyx_obj_6gevent_6_queue_Queue *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__next__", 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._queue.Queue.__next__", __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-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">405</span>: result = self.get()</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Queue *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_result = __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="">406</span>: if result is StopIteration:</pre> <pre class='cython code score-0 '> __pyx_t_2 = (__pyx_v_result == __pyx_builtin_StopIteration); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">407</span>: raise result</pre> <pre class='cython code score-2 '> <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_v_result, 0, 0, 0); <span class='error_goto'>__PYX_ERR(0, 407, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">408</span>: return result</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_result); __pyx_r = __pyx_v_result; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">409</span>: </pre> <pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">410</span>: next = __next__ # Py2</pre> <pre class='cython code score-13 '> <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_6, (PyObject *)__pyx_ptype_6gevent_6_queue_Queue, __pyx_n_s_next);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 410, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Queue->tp_dict, __pyx_n_s_next_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 410, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Queue); </pre><pre class="cython line score-0"> <span class="">411</span>: </pre> <pre class="cython line score-0"> <span class="">412</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">413</span>: class UnboundQueue(Queue):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_queue_UnboundQueue { struct __pyx_vtabstruct_6gevent_6_queue_Queue __pyx_base; }; static struct __pyx_vtabstruct_6gevent_6_queue_UnboundQueue *__pyx_vtabptr_6gevent_6_queue_UnboundQueue; </pre><pre class="cython line score-0"> <span class="">414</span>: # A specialization of Queue that knows it can never</pre> <pre class="cython line score-0"> <span class="">415</span>: # be bound. Changing its maxsize has no effect.</pre> <pre class="cython line score-0"> <span class="">416</span>: </pre> <pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">417</span>: __slots__ = ()</pre> <pre class='cython code score-10 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_UnboundQueue->tp_dict, __pyx_n_s_slots, __pyx_empty_tuple) < 0) <span class='error_goto'>__PYX_ERR(0, 417, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_UnboundQueue); </pre><pre class="cython line score-0"> <span class="">418</span>: </pre> <pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">419</span>: def __init__(self, maxsize=None, items=()):</pre> <pre class='cython code score-28 '>/* Python wrapper */ static int __pyx_pw_6gevent_6_queue_12UnboundQueue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6gevent_6_queue_12UnboundQueue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_maxsize = 0; PyObject *__pyx_v_items = 0; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)__pyx_empty_tuple); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_maxsize); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_items); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 419, __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_maxsize = values[0]; __pyx_v_items = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 0, 0, 2, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 419, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.UnboundQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_6_queue_12UnboundQueue___init__(((struct __pyx_obj_6gevent_6_queue_UnboundQueue *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_6_queue_12UnboundQueue___init__(struct __pyx_obj_6gevent_6_queue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items) { int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.UnboundQueue.__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-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">420</span>: if maxsize is not None:</pre> <pre class='cython code score-0 '> __pyx_t_1 = (__pyx_v_maxsize != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { /* … */ } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">421</span>: raise ValueError("UnboundQueue has no maxsize")</pre> <pre class='cython code score-10 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_ValueError, __pyx_tuple__4, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_3, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='error_goto'>__PYX_ERR(0, 421, __pyx_L1_error)</span> /* … */ __pyx_tuple__4 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_UnboundQueue_has_no_maxsize);<span class='error_goto'> if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 421, __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-42" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">422</span>: Queue.__init__(self, maxsize, items)</pre> <pre class='cython code score-42 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_6_queue_Queue), __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items}; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items}; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); } else #endif { __pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 422, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); if (__pyx_t_5) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_maxsize); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_maxsize); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 1+__pyx_t_6, __pyx_v_maxsize); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_items); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_items); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 2+__pyx_t_6, __pyx_v_items); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">423</span>: self.putters = None # Will never be used.</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->__pyx_base.putters); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->__pyx_base.putters); __pyx_v_self->__pyx_base.putters = Py_None; </pre><pre class="cython line score-0"> <span class="">424</span>: </pre> <pre class="cython line score-54" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">425</span>: def put(self, item, block=True, timeout=None):</pre> <pre class='cython code score-54 '>static PyObject *__pyx_pw_6gevent_6_queue_12UnboundQueue_3put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_12UnboundQueue_put(struct __pyx_obj_6gevent_6_queue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_item, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_12UnboundQueue_put *__pyx_optional_args) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put", 0); if (__pyx_optional_args) { } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.UnboundQueue.put", __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_queue_12UnboundQueue_3put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_12UnboundQueue_2put[] = "UnboundQueue.put(self, item, block=True, timeout=None)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_12UnboundQueue_3put = {"put", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_12UnboundQueue_3put, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_12UnboundQueue_2put}; static PyObject *__pyx_pw_6gevent_6_queue_12UnboundQueue_3put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_item = 0; PyObject *__pyx_v_block = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_True); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_item)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) <span class='error_goto'>__PYX_ERR(0, 425, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_item = values[0]; __pyx_v_block = values[1]; __pyx_v_timeout = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("put", 0, 1, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 425, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.UnboundQueue.put", __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_queue_12UnboundQueue_2put(((struct __pyx_obj_6gevent_6_queue_UnboundQueue *)__pyx_v_self), __pyx_v_item, __pyx_v_block, __pyx_v_timeout); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_12UnboundQueue_2put(struct __pyx_obj_6gevent_6_queue_UnboundQueue *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put", 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_queue_UnboundQueue->__pyx_base.put(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), __pyx_v_item, 1, &__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __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._queue.UnboundQueue.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__43 = <span class='py_c_api'>PyTuple_Pack</span>(4, __pyx_n_s_self, __pyx_n_s_item, __pyx_n_s_block, __pyx_n_s_timeout);<span class='error_goto'> if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 425, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__43); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__43); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_12UnboundQueue_3put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_UnboundQueue_put, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__44));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 425, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_UnboundQueue->tp_dict, __pyx_n_s_put_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 425, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_UnboundQueue); __pyx_codeobj__44 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_2, 425, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 425, __pyx_L1_error)</span> /* … */ struct __pyx_opt_args_6gevent_6_queue_12UnboundQueue_put { int __pyx_n; PyObject *block; PyObject *timeout; }; </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">426</span>: self._put(item)</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_UnboundQueue *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._put(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), __pyx_v_item, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __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-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">427</span>: if self.getters:</pre> <pre class='cython code score-2 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->__pyx_base.getters); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 427, __pyx_L1_error)</span> if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">428</span>: self._schedule_unlock()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_UnboundQueue *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._schedule_unlock(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">429</span>: </pre> <pre class="cython line score-0"> <span class="">430</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">431</span>: class PriorityQueue(Queue):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_queue_PriorityQueue { struct __pyx_vtabstruct_6gevent_6_queue_Queue __pyx_base; }; static struct __pyx_vtabstruct_6gevent_6_queue_PriorityQueue *__pyx_vtabptr_6gevent_6_queue_PriorityQueue; </pre><pre class="cython line score-0"> <span class="">432</span>: '''A subclass of :class:`Queue` that retrieves entries in priority order (lowest first).</pre> <pre class="cython line score-0"> <span class="">433</span>: </pre> <pre class="cython line score-0"> <span class="">434</span>: Entries are typically tuples of the form: ``(priority number, data)``.</pre> <pre class="cython line score-0"> <span class="">435</span>: </pre> <pre class="cython line score-0"> <span class="">436</span>: .. versionchanged:: 1.2a1</pre> <pre class="cython line score-0"> <span class="">437</span>: Any *items* given to the constructor will now be passed through</pre> <pre class="cython line score-0"> <span class="">438</span>: :func:`heapq.heapify` to ensure the invariants of this class hold.</pre> <pre class="cython line score-0"> <span class="">439</span>: Previously it was just assumed that they were already a heap.</pre> <pre class="cython line score-0"> <span class="">440</span>: '''</pre> <pre class="cython line score-0"> <span class="">441</span>: </pre> <pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">442</span>: __slots__ = ()</pre> <pre class='cython code score-10 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_PriorityQueue->tp_dict, __pyx_n_s_slots, __pyx_empty_tuple) < 0) <span class='error_goto'>__PYX_ERR(0, 442, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_PriorityQueue); </pre><pre class="cython line score-0"> <span class="">443</span>: </pre> <pre class="cython line score-44" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">444</span>: def _create_queue(self, items=()):</pre> <pre class='cython code score-44 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_13PriorityQueue_1_create_queue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_13PriorityQueue__create_queue[] = "PriorityQueue._create_queue(self, items=())"; static PyMethodDef __pyx_mdef_6gevent_6_queue_13PriorityQueue_1_create_queue = {"_create_queue", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_13PriorityQueue_1_create_queue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_13PriorityQueue__create_queue}; static PyObject *__pyx_pw_6gevent_6_queue_13PriorityQueue_1_create_queue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_items = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_create_queue (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_empty_tuple); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_items); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_create_queue") < 0)) <span class='error_goto'>__PYX_ERR(0, 444, __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_items = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("_create_queue", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 444, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.PriorityQueue._create_queue", __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_queue_13PriorityQueue__create_queue(((struct __pyx_obj_6gevent_6_queue_PriorityQueue *)__pyx_v_self), __pyx_v_items); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_13PriorityQueue__create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_6_queue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_items) { PyObject *__pyx_v_q = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_create_queue", 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._queue.PriorityQueue._create_queue", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_q); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__45 = <span class='py_c_api'>PyTuple_Pack</span>(3, __pyx_n_s_self, __pyx_n_s_items, __pyx_n_s_q);<span class='error_goto'> if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 444, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__45); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__45); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_13PriorityQueue_1_create_queue, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PriorityQueue__create_queue, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__46));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 444, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_PriorityQueue->tp_dict, __pyx_n_s_create_queue, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 444, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_PriorityQueue); __pyx_codeobj__46 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_create_queue, 444, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 444, __pyx_L1_error)</span> </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">445</span>: q = list(items)</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='py_c_api'>PySequence_List</span>(__pyx_v_items);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_q = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">446</span>: _heapify(q)</pre> <pre class='cython code score-16 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_6_queue__heapify); __pyx_t_2 = __pyx_v_6gevent_6_queue__heapify; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_q) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_v_q); <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, 446, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">447</span>: return q</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_q); __pyx_r = __pyx_v_q; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">448</span>: </pre> <pre class="cython line score-61" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">449</span>: def _put(self, item):</pre> <pre class='cython code score-61 '>static PyObject *__pyx_pw_6gevent_6_queue_13PriorityQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_13PriorityQueue__put(struct __pyx_obj_6gevent_6_queue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_put);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __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_queue_13PriorityQueue_3_put)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_v_item); <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, 449, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.PriorityQueue._put", __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_queue_13PriorityQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static char __pyx_doc_6gevent_6_queue_13PriorityQueue_2_put[] = "PriorityQueue._put(self, item)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_13PriorityQueue_3_put = {"_put", (PyCFunction)__pyx_pw_6gevent_6_queue_13PriorityQueue_3_put, METH_O, __pyx_doc_6gevent_6_queue_13PriorityQueue_2_put}; static PyObject *__pyx_pw_6gevent_6_queue_13PriorityQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_13PriorityQueue_2_put(((struct __pyx_obj_6gevent_6_queue_PriorityQueue *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_13PriorityQueue_2_put(struct __pyx_obj_6gevent_6_queue_PriorityQueue *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_13PriorityQueue__put(__pyx_v_self, __pyx_v_item, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __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._queue.PriorityQueue._put", __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__47 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_item);<span class='error_goto'> if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 449, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__47); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__47); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_13PriorityQueue_3_put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PriorityQueue__put, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__48));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_PriorityQueue->tp_dict, __pyx_n_s_put, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 449, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_PriorityQueue); __pyx_codeobj__48 = (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__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put, 449, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 449, __pyx_L1_error)</span> </pre><pre class="cython line score-39" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">450</span>: _heappush(self.queue, item)</pre> <pre class='cython code score-39 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_6_queue__heappush); __pyx_t_2 = __pyx_v_6gevent_6_queue__heappush; __pyx_t_3 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self->__pyx_base.queue, __pyx_v_item}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self->__pyx_base.queue, __pyx_v_item}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif { __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 450, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); if (__pyx_t_3) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->__pyx_base.queue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_self->__pyx_base.queue); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0+__pyx_t_5, __pyx_v_self->__pyx_base.queue); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_item); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_item); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 1+__pyx_t_5, __pyx_v_item); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_4, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">451</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">452</span>: def _get(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_6_queue_13PriorityQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_13PriorityQueue__get(struct __pyx_obj_6gevent_6_queue_PriorityQueue *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_get", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __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_queue_13PriorityQueue_5_get)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 452, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_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._queue.PriorityQueue._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_queue_13PriorityQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_13PriorityQueue_4_get[] = "PriorityQueue._get(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_13PriorityQueue_5_get = {"_get", (PyCFunction)__pyx_pw_6gevent_6_queue_13PriorityQueue_5_get, METH_NOARGS, __pyx_doc_6gevent_6_queue_13PriorityQueue_4_get}; static PyObject *__pyx_pw_6gevent_6_queue_13PriorityQueue_5_get(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 (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_13PriorityQueue_4_get(((struct __pyx_obj_6gevent_6_queue_PriorityQueue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_13PriorityQueue_4_get(struct __pyx_obj_6gevent_6_queue_PriorityQueue *__pyx_v_self) { 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_1 = __pyx_f_6gevent_6_queue_13PriorityQueue__get(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __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._queue.PriorityQueue._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__49 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 452, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__49); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__49); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_13PriorityQueue_5_get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PriorityQueue__get, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__50));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 452, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_PriorityQueue->tp_dict, __pyx_n_s_get, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 452, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_PriorityQueue); __pyx_codeobj__50 = (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__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get, 452, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 452, __pyx_L1_error)</span> </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">453</span>: return _heappop(self.queue)</pre> <pre class='cython code score-16 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_6gevent_6_queue__heappop); __pyx_t_2 = __pyx_v_6gevent_6_queue__heappop; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->__pyx_base.queue) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_v_self->__pyx_base.queue); <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, 453, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">454</span>: </pre> <pre class="cython line score-0"> <span class="">455</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">456</span>: class LifoQueue(Queue):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_queue_LifoQueue { struct __pyx_vtabstruct_6gevent_6_queue_Queue __pyx_base; }; static struct __pyx_vtabstruct_6gevent_6_queue_LifoQueue *__pyx_vtabptr_6gevent_6_queue_LifoQueue; </pre><pre class="cython line score-0"> <span class="">457</span>: '''A subclass of :class:`Queue` that retrieves most recently added entries first.'''</pre> <pre class="cython line score-0"> <span class="">458</span>: </pre> <pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">459</span>: __slots__ = ()</pre> <pre class='cython code score-10 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_LifoQueue->tp_dict, __pyx_n_s_slots, __pyx_empty_tuple) < 0) <span class='error_goto'>__PYX_ERR(0, 459, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_LifoQueue); </pre><pre class="cython line score-0"> <span class="">460</span>: </pre> <pre class="cython line score-41" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">461</span>: def _create_queue(self, items=()):</pre> <pre class='cython code score-41 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_9LifoQueue_1_create_queue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_9LifoQueue__create_queue[] = "LifoQueue._create_queue(self, items=())"; static PyMethodDef __pyx_mdef_6gevent_6_queue_9LifoQueue_1_create_queue = {"_create_queue", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_9LifoQueue_1_create_queue, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_9LifoQueue__create_queue}; static PyObject *__pyx_pw_6gevent_6_queue_9LifoQueue_1_create_queue(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_items = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_create_queue (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_empty_tuple); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_items); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_create_queue") < 0)) <span class='error_goto'>__PYX_ERR(0, 461, __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_items = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("_create_queue", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 461, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.LifoQueue._create_queue", __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_queue_9LifoQueue__create_queue(((struct __pyx_obj_6gevent_6_queue_LifoQueue *)__pyx_v_self), __pyx_v_items); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_9LifoQueue__create_queue(CYTHON_UNUSED struct __pyx_obj_6gevent_6_queue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_items) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_create_queue", 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._queue.LifoQueue._create_queue", __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__51 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_items);<span class='error_goto'> if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 461, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__51); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__51); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_9LifoQueue_1_create_queue, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LifoQueue__create_queue, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__52));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_LifoQueue->tp_dict, __pyx_n_s_create_queue, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 461, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_LifoQueue); __pyx_codeobj__52 = (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__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_create_queue, 461, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 461, __pyx_L1_error)</span> </pre><pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">462</span>: return list(items)</pre> <pre class='cython code score-6 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='py_c_api'>PySequence_List</span>(__pyx_v_items);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">463</span>: </pre> <pre class="cython line score-61" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">464</span>: def _put(self, item):</pre> <pre class='cython code score-61 '>static PyObject *__pyx_pw_6gevent_6_queue_9LifoQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_9LifoQueue__put(struct __pyx_obj_6gevent_6_queue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_put);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __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_queue_9LifoQueue_3_put)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_v_item); <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, 464, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.LifoQueue._put", __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_queue_9LifoQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static char __pyx_doc_6gevent_6_queue_9LifoQueue_2_put[] = "LifoQueue._put(self, item)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_9LifoQueue_3_put = {"_put", (PyCFunction)__pyx_pw_6gevent_6_queue_9LifoQueue_3_put, METH_O, __pyx_doc_6gevent_6_queue_9LifoQueue_2_put}; static PyObject *__pyx_pw_6gevent_6_queue_9LifoQueue_3_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_9LifoQueue_2_put(((struct __pyx_obj_6gevent_6_queue_LifoQueue *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_9LifoQueue_2_put(struct __pyx_obj_6gevent_6_queue_LifoQueue *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_9LifoQueue__put(__pyx_v_self, __pyx_v_item, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __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._queue.LifoQueue._put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__53 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_item);<span class='error_goto'> if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 464, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__53); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__53); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_9LifoQueue_3_put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LifoQueue__put, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__54));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 464, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_LifoQueue->tp_dict, __pyx_n_s_put, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 464, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_LifoQueue); __pyx_codeobj__54 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put, 464, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 464, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">465</span>: self.queue.append(item)</pre> <pre class='cython code score-2 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_v_self->__pyx_base.queue, __pyx_v_item);<span class='error_goto'> if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 465, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">466</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">467</span>: def _get(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_6_queue_9LifoQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_9LifoQueue__get(struct __pyx_obj_6gevent_6_queue_LifoQueue *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_get", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __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_queue_9LifoQueue_5_get)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 467, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_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._queue.LifoQueue._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_queue_9LifoQueue_5_get(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_9LifoQueue_4_get[] = "LifoQueue._get(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_9LifoQueue_5_get = {"_get", (PyCFunction)__pyx_pw_6gevent_6_queue_9LifoQueue_5_get, METH_NOARGS, __pyx_doc_6gevent_6_queue_9LifoQueue_4_get}; static PyObject *__pyx_pw_6gevent_6_queue_9LifoQueue_5_get(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 (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_9LifoQueue_4_get(((struct __pyx_obj_6gevent_6_queue_LifoQueue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_9LifoQueue_4_get(struct __pyx_obj_6gevent_6_queue_LifoQueue *__pyx_v_self) { 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_1 = __pyx_f_6gevent_6_queue_9LifoQueue__get(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __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._queue.LifoQueue._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__55 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 467, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__55); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__55); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_9LifoQueue_5_get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LifoQueue__get, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__56));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_LifoQueue->tp_dict, __pyx_n_s_get, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 467, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_LifoQueue); __pyx_codeobj__56 = (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__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get, 467, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 467, __pyx_L1_error)</span> </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">468</span>: return self.queue.pop()</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_Pop</span>(__pyx_v_self->__pyx_base.queue);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">469</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">470</span>: def _peek(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_6_queue_9LifoQueue_7_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_9LifoQueue__peek(struct __pyx_obj_6gevent_6_queue_LifoQueue *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_peek", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_peek);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __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_queue_9LifoQueue_7_peek)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 470, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_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._queue.LifoQueue._peek", __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_queue_9LifoQueue_7_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_9LifoQueue_6_peek[] = "LifoQueue._peek(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_9LifoQueue_7_peek = {"_peek", (PyCFunction)__pyx_pw_6gevent_6_queue_9LifoQueue_7_peek, METH_NOARGS, __pyx_doc_6gevent_6_queue_9LifoQueue_6_peek}; static PyObject *__pyx_pw_6gevent_6_queue_9LifoQueue_7_peek(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_peek (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_9LifoQueue_6_peek(((struct __pyx_obj_6gevent_6_queue_LifoQueue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_9LifoQueue_6_peek(struct __pyx_obj_6gevent_6_queue_LifoQueue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_peek", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_9LifoQueue__peek(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __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._queue.LifoQueue._peek", __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__57 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 470, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__57); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__57); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_9LifoQueue_7_peek, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_LifoQueue__peek, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__58));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 470, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_LifoQueue->tp_dict, __pyx_n_s_peek, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 470, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_LifoQueue); __pyx_codeobj__58 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_peek, 470, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 470, __pyx_L1_error)</span> </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">471</span>: return self.queue[-1]</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_GetItemInt</span>(__pyx_v_self->__pyx_base.queue, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">472</span>: </pre> <pre class="cython line score-0"> <span class="">473</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">474</span>: class JoinableQueue(Queue):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_queue_JoinableQueue { struct __pyx_vtabstruct_6gevent_6_queue_Queue __pyx_base; }; static struct __pyx_vtabstruct_6gevent_6_queue_JoinableQueue *__pyx_vtabptr_6gevent_6_queue_JoinableQueue; </pre><pre class="cython line score-0"> <span class="">475</span>: """</pre> <pre class="cython line score-0"> <span class="">476</span>: A subclass of :class:`Queue` that additionally has</pre> <pre class="cython line score-0"> <span class="">477</span>: :meth:`task_done` and :meth:`join` methods.</pre> <pre class="cython line score-0"> <span class="">478</span>: """</pre> <pre class="cython line score-0"> <span class="">479</span>: </pre> <pre class="cython line score-0"> <span class="">480</span>: __slots__ = (</pre> <pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">481</span>: '_cond',</pre> <pre class='cython code score-15 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_JoinableQueue->tp_dict, __pyx_n_s_slots, __pyx_tuple__59) < 0) <span class='error_goto'>__PYX_ERR(0, 480, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_JoinableQueue); /* … */ __pyx_tuple__59 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_cond, __pyx_n_s_unfinished_tasks);<span class='error_goto'> if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 481, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__59); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__59); </pre><pre class="cython line score-0"> <span class="">482</span>: 'unfinished_tasks',</pre> <pre class="cython line score-0"> <span class="">483</span>: )</pre> <pre class="cython line score-0"> <span class="">484</span>: </pre> <pre class="cython line score-33" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">485</span>: def __init__(self, maxsize=None, items=(), unfinished_tasks=None):</pre> <pre class='cython code score-33 '>/* Python wrapper */ static int __pyx_pw_6gevent_6_queue_13JoinableQueue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_13JoinableQueue___init__[] = "\n\n .. versionchanged:: 1.1a1\n If *unfinished_tasks* is not given, then all the given *items*\n (if any) will be considered unfinished.\n\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_6gevent_6_queue_13JoinableQueue___init__; #endif static int __pyx_pw_6gevent_6_queue_13JoinableQueue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_maxsize = 0; PyObject *__pyx_v_items = 0; PyObject *__pyx_v_unfinished_tasks = 0; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,&__pyx_n_s_items,&__pyx_n_s_unfinished_tasks,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)__pyx_empty_tuple); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_maxsize); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_items); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_unfinished_tasks); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 485, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_maxsize = values[0]; __pyx_v_items = values[1]; __pyx_v_unfinished_tasks = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 0, 0, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 485, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.JoinableQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_6_queue_13JoinableQueue___init__(((struct __pyx_obj_6gevent_6_queue_JoinableQueue *)__pyx_v_self), __pyx_v_maxsize, __pyx_v_items, __pyx_v_unfinished_tasks); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_6_queue_13JoinableQueue___init__(struct __pyx_obj_6gevent_6_queue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_maxsize, PyObject *__pyx_v_items, PyObject *__pyx_v_unfinished_tasks) { PyObject *__pyx_v_Event = NULL; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.JoinableQueue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_Event); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-0"> <span class="">486</span>: """</pre> <pre class="cython line score-0"> <span class="">487</span>: </pre> <pre class="cython line score-0"> <span class="">488</span>: .. versionchanged:: 1.1a1</pre> <pre class="cython line score-0"> <span class="">489</span>: If *unfinished_tasks* is not given, then all the given *items*</pre> <pre class="cython line score-0"> <span class="">490</span>: (if any) will be considered unfinished.</pre> <pre class="cython line score-0"> <span class="">491</span>: </pre> <pre class="cython line score-0"> <span class="">492</span>: """</pre> <pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">493</span>: Queue.__init__(self, maxsize, items, _warn_depth=3)</pre> <pre class='cython code score-26 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_6_queue_Queue), __pyx_n_s_init);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <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, 0, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_maxsize); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_maxsize); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 1, __pyx_v_maxsize); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_items); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_items); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 2, __pyx_v_items); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyDict_NewPresized</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_t_3, __pyx_n_s_warn_depth, __pyx_int_3) < 0) <span class='error_goto'>__PYX_ERR(0, 493, __pyx_L1_error)</span> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_2, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 493, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; </pre><pre class="cython line score-0"> <span class="">494</span>: </pre> <pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">495</span>: from gevent.event import Event</pre> <pre class='cython code score-15 '> __pyx_t_4 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <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_4, 0, __pyx_n_s_Event); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_Import</span>(__pyx_n_s_gevent_event, __pyx_t_4, 0);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_3, __pyx_n_s_Event);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 495, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); __pyx_v_Event = __pyx_t_4; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">496</span>: self._cond = Event()</pre> <pre class='cython code score-20 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_Event); __pyx_t_4 = __pyx_v_Event; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 496, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(<span class='pyx_c_api'>__Pyx_TypeTest</span>(__pyx_t_3, __pyx_ptype_6gevent_6_event_Event))))) <span class='error_goto'>__PYX_ERR(0, 496, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_cond); <span class='pyx_macro_api'>__Pyx_DECREF</span>(((PyObject *)__pyx_v_self->_cond)); __pyx_v_self->_cond = ((struct __pyx_obj_6gevent_6_event_Event *)__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">497</span>: self._cond.set()</pre> <pre class='cython code score-19 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_set);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 497, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">498</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">499</span>: if unfinished_tasks:</pre> <pre class='cython code score-2 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_unfinished_tasks); if (unlikely(__pyx_t_5 < 0)) <span class='error_goto'>__PYX_ERR(0, 499, __pyx_L1_error)</span> if (__pyx_t_5) { /* … */ goto __pyx_L3; } </pre><pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">500</span>: self.unfinished_tasks = unfinished_tasks</pre> <pre class='cython code score-7 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyInt_As_int</span>(__pyx_v_unfinished_tasks); if (unlikely((__pyx_t_6 == (int)-1) && <span class='py_c_api'>PyErr_Occurred</span>())) <span class='error_goto'>__PYX_ERR(0, 500, __pyx_L1_error)</span> __pyx_v_self->unfinished_tasks = __pyx_t_6; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">501</span>: elif items:</pre> <pre class='cython code score-2 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_items); if (unlikely(__pyx_t_5 < 0)) <span class='error_goto'>__PYX_ERR(0, 501, __pyx_L1_error)</span> if (__pyx_t_5) { /* … */ goto __pyx_L3; } </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">502</span>: self.unfinished_tasks = len(items)</pre> <pre class='cython code score-5 '> __pyx_t_7 = <span class='py_c_api'>PyObject_Length</span>(__pyx_v_items);<span class='error_goto'> if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 502, __pyx_L1_error)</span> __pyx_v_self->unfinished_tasks = __pyx_t_7; </pre><pre class="cython line score-0"> <span class="">503</span>: else:</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">504</span>: self.unfinished_tasks = 0</pre> <pre class='cython code score-0 '> /*else*/ { __pyx_v_self->unfinished_tasks = 0; } __pyx_L3:; </pre><pre class="cython line score-0"> <span class="">505</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">506</span>: if self.unfinished_tasks:</pre> <pre class='cython code score-0 '> __pyx_t_5 = (__pyx_v_self->unfinished_tasks != 0); if (__pyx_t_5) { /* … */ } </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">507</span>: self._cond.clear()</pre> <pre class='cython code score-19 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_clear);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_2 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_2) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 507, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">508</span>: </pre> <pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">509</span>: def copy(self):</pre> <pre class='cython code score-28 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_13JoinableQueue_2copy[] = "JoinableQueue.copy(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_13JoinableQueue_3copy = {"copy", (PyCFunction)__pyx_pw_6gevent_6_queue_13JoinableQueue_3copy, METH_NOARGS, __pyx_doc_6gevent_6_queue_13JoinableQueue_2copy}; static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_3copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("copy (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_13JoinableQueue_2copy(((struct __pyx_obj_6gevent_6_queue_JoinableQueue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_13JoinableQueue_2copy(struct __pyx_obj_6gevent_6_queue_JoinableQueue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("copy", 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_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.JoinableQueue.copy", __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__60 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 509, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__60); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__60); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_13JoinableQueue_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue_copy, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__61));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 509, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_JoinableQueue->tp_dict, __pyx_n_s_copy, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 509, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_JoinableQueue); __pyx_codeobj__61 = (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__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_copy, 509, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 509, __pyx_L1_error)</span> </pre><pre class="cython line score-47" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">510</span>: return type(self)(self.maxsize, self.queue, self.unfinished_tasks)</pre> <pre class='cython code score-47 '> <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_maxsize);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyInt_From_int</span>(__pyx_v_self->unfinished_tasks);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 510, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __pyx_t_4 = ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_v_self->__pyx_base.queue, __pyx_t_3}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_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_3); __pyx_t_3 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_2, __pyx_v_self->__pyx_base.queue, __pyx_t_3}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_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_3); __pyx_t_3 = 0; } else #endif { __pyx_t_7 = <span class='py_c_api'>PyTuple_New</span>(3+__pyx_t_6);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); if (__pyx_t_5) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_5); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 0+__pyx_t_6, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_self->__pyx_base.queue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_self->__pyx_base.queue); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self->__pyx_base.queue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_7, 2+__pyx_t_6, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_t_7, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">511</span>: </pre> <pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">512</span>: def _format(self):</pre> <pre class='cython code score-26 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_5_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_13JoinableQueue_4_format[] = "JoinableQueue._format(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_13JoinableQueue_5_format = {"_format", (PyCFunction)__pyx_pw_6gevent_6_queue_13JoinableQueue_5_format, METH_NOARGS, __pyx_doc_6gevent_6_queue_13JoinableQueue_4_format}; static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_5_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_format (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_13JoinableQueue_4_format(((struct __pyx_obj_6gevent_6_queue_JoinableQueue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_13JoinableQueue_4_format(struct __pyx_obj_6gevent_6_queue_JoinableQueue *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_format", 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._queue.JoinableQueue._format", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__62 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_result);<span class='error_goto'> if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 512, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__62); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__62); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_13JoinableQueue_5_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue__format, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__63));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_JoinableQueue->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 512, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_JoinableQueue); __pyx_codeobj__63 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_format, 512, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 512, __pyx_L1_error)</span> </pre><pre class="cython line score-16" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">513</span>: result = Queue._format(self)</pre> <pre class='cython code score-16 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_ptype_6gevent_6_queue_Queue), __pyx_n_s_format);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, ((PyObject *)__pyx_v_self)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 513, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __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="">514</span>: if self.unfinished_tasks:</pre> <pre class='cython code score-0 '> __pyx_t_4 = (__pyx_v_self->unfinished_tasks != 0); if (__pyx_t_4) { /* … */ } </pre><pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">515</span>: result += ' tasks=%s _cond=%s' % (self.unfinished_tasks, self._cond)</pre> <pre class='cython code score-20 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyInt_From_int</span>(__pyx_v_self->unfinished_tasks);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_self->_cond)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_self->_cond)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_cond)); __pyx_t_1 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_tasks_s__cond_s, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __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, 515, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">516</span>: return result</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_result); __pyx_r = __pyx_v_result; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">517</span>: </pre> <pre class="cython line score-61" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">518</span>: def _put(self, item):</pre> <pre class='cython code score-61 '>static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_7_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_13JoinableQueue__put(struct __pyx_obj_6gevent_6_queue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_item, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_put);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __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_queue_13JoinableQueue_7_put)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_v_item); <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, 518, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.JoinableQueue._put", __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_queue_13JoinableQueue_7_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static char __pyx_doc_6gevent_6_queue_13JoinableQueue_6_put[] = "JoinableQueue._put(self, item)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_13JoinableQueue_7_put = {"_put", (PyCFunction)__pyx_pw_6gevent_6_queue_13JoinableQueue_7_put, METH_O, __pyx_doc_6gevent_6_queue_13JoinableQueue_6_put}; static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_7_put(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_13JoinableQueue_6_put(((struct __pyx_obj_6gevent_6_queue_JoinableQueue *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_13JoinableQueue_6_put(struct __pyx_obj_6gevent_6_queue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_put", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_13JoinableQueue__put(__pyx_v_self, __pyx_v_item, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __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._queue.JoinableQueue._put", __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__64 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_item);<span class='error_goto'> if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 518, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__64); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__64); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_13JoinableQueue_7_put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue__put, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__65));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 518, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_JoinableQueue->tp_dict, __pyx_n_s_put, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 518, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_JoinableQueue); __pyx_codeobj__65 = (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__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put, 518, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 518, __pyx_L1_error)</span> </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">519</span>: Queue._put(self, item)</pre> <pre class='cython code score-1 '> __pyx_t_1 = __pyx_f_6gevent_6_queue_5Queue__put(((struct __pyx_obj_6gevent_6_queue_Queue *)__pyx_v_self), __pyx_v_item, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __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" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">520</span>: self.unfinished_tasks += 1</pre> <pre class='cython code score-0 '> __pyx_v_self->unfinished_tasks = (__pyx_v_self->unfinished_tasks + 1); </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">521</span>: self._cond.clear()</pre> <pre class='cython code score-19 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_clear);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 521, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">522</span>: </pre> <pre class="cython line score-26" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">523</span>: def task_done(self):</pre> <pre class='cython code score-26 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_9task_done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_13JoinableQueue_8task_done[] = "JoinableQueue.task_done(self)\nIndicate that a formerly enqueued task is complete. Used by queue consumer threads.\n For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue\n that the processing on the task is complete.\n\n If a :meth:`join` is currently blocking, it will resume when all items have been processed\n (meaning that a :meth:`task_done` call was received for every item that had been\n :meth:`put <Queue.put>` into the queue).\n\n Raises a :exc:`ValueError` if called more times than there were items placed in the queue.\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_13JoinableQueue_9task_done = {"task_done", (PyCFunction)__pyx_pw_6gevent_6_queue_13JoinableQueue_9task_done, METH_NOARGS, __pyx_doc_6gevent_6_queue_13JoinableQueue_8task_done}; static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_9task_done(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("task_done (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_13JoinableQueue_8task_done(((struct __pyx_obj_6gevent_6_queue_JoinableQueue *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_13JoinableQueue_8task_done(struct __pyx_obj_6gevent_6_queue_JoinableQueue *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("task_done", 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_c_api'>__Pyx_AddTraceback</span>("gevent._queue.JoinableQueue.task_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__66 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 523, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__66); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__66); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_13JoinableQueue_9task_done, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue_task_done, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__67));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 523, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_JoinableQueue->tp_dict, __pyx_n_s_task_done, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 523, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_JoinableQueue); __pyx_codeobj__67 = (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__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_task_done, 523, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 523, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">524</span>: '''Indicate that a formerly enqueued task is complete. Used by queue consumer threads.</pre> <pre class="cython line score-0"> <span class="">525</span>: For each :meth:`get <Queue.get>` used to fetch a task, a subsequent call to :meth:`task_done` tells the queue</pre> <pre class="cython line score-0"> <span class="">526</span>: that the processing on the task is complete.</pre> <pre class="cython line score-0"> <span class="">527</span>: </pre> <pre class="cython line score-0"> <span class="">528</span>: If a :meth:`join` is currently blocking, it will resume when all items have been processed</pre> <pre class="cython line score-0"> <span class="">529</span>: (meaning that a :meth:`task_done` call was received for every item that had been</pre> <pre class="cython line score-0"> <span class="">530</span>: :meth:`put <Queue.put>` into the queue).</pre> <pre class="cython line score-0"> <span class="">531</span>: </pre> <pre class="cython line score-0"> <span class="">532</span>: Raises a :exc:`ValueError` if called more times than there were items placed in the queue.</pre> <pre class="cython line score-0"> <span class="">533</span>: '''</pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">534</span>: if self.unfinished_tasks <= 0:</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((__pyx_v_self->unfinished_tasks <= 0) != 0); if (unlikely(__pyx_t_1)) { /* … */ } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">535</span>: raise ValueError('task_done() called too many times')</pre> <pre class='cython code score-10 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_ValueError, __pyx_tuple__5, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_2, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='error_goto'>__PYX_ERR(0, 535, __pyx_L1_error)</span> /* … */ __pyx_tuple__5 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_task_done_called_too_many_times);<span class='error_goto'> if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 535, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__5); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__5); </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">536</span>: self.unfinished_tasks -= 1</pre> <pre class='cython code score-0 '> __pyx_v_self->unfinished_tasks = (__pyx_v_self->unfinished_tasks - 1); </pre><pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">537</span>: if self.unfinished_tasks == 0:</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((__pyx_v_self->unfinished_tasks == 0) != 0); if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">538</span>: self._cond.set()</pre> <pre class='cython code score-19 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self->_cond), __pyx_n_s_set);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 538, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-0"> <span class="">539</span>: </pre> <pre class="cython line score-43" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">540</span>: def join(self, timeout=None):</pre> <pre class='cython code score-43 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_11join(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_13JoinableQueue_10join[] = "JoinableQueue.join(self, timeout=None)\n\n Block until all items in the queue have been gotten and processed.\n\n The count of unfinished tasks goes up whenever an item is added to the queue.\n The count goes down whenever a consumer thread calls :meth:`task_done` to indicate\n that the item was retrieved and all work on it is complete. When the count of\n unfinished tasks drops to zero, :meth:`join` unblocks.\n\n :param float timeout: If not ``None``, then wait no more than this time in seconds\n for all tasks to finish.\n :return: ``True`` if all tasks have finished; if ``timeout`` was given and expired before\n all tasks finished, ``False``.\n\n .. versionchanged:: 1.1a1\n Add the *timeout* parameter.\n "; static PyMethodDef __pyx_mdef_6gevent_6_queue_13JoinableQueue_11join = {"join", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_13JoinableQueue_11join, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_13JoinableQueue_10join}; static PyObject *__pyx_pw_6gevent_6_queue_13JoinableQueue_11join(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "join") < 0)) <span class='error_goto'>__PYX_ERR(0, 540, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_timeout = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("join", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 540, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.JoinableQueue.join", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_6_queue_13JoinableQueue_10join(((struct __pyx_obj_6gevent_6_queue_JoinableQueue *)__pyx_v_self), __pyx_v_timeout); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_13JoinableQueue_10join(struct __pyx_obj_6gevent_6_queue_JoinableQueue *__pyx_v_self, PyObject *__pyx_v_timeout) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("join", 0); /* … */ /* 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._queue.JoinableQueue.join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__68 = <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__68)) __PYX_ERR(0, 540, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__68); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__68); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_13JoinableQueue_11join, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_JoinableQueue_join, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__69));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 540, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_JoinableQueue->tp_dict, __pyx_n_s_join, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 540, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_JoinableQueue); __pyx_codeobj__69 = (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__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_join, 540, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 540, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">541</span>: '''</pre> <pre class="cython line score-0"> <span class="">542</span>: Block until all items in the queue have been gotten and processed.</pre> <pre class="cython line score-0"> <span class="">543</span>: </pre> <pre class="cython line score-0"> <span class="">544</span>: The count of unfinished tasks goes up whenever an item is added to the queue.</pre> <pre class="cython line score-0"> <span class="">545</span>: The count goes down whenever a consumer thread calls :meth:`task_done` to indicate</pre> <pre class="cython line score-0"> <span class="">546</span>: that the item was retrieved and all work on it is complete. When the count of</pre> <pre class="cython line score-0"> <span class="">547</span>: unfinished tasks drops to zero, :meth:`join` unblocks.</pre> <pre class="cython line score-0"> <span class="">548</span>: </pre> <pre class="cython line score-0"> <span class="">549</span>: :param float timeout: If not ``None``, then wait no more than this time in seconds</pre> <pre class="cython line score-0"> <span class="">550</span>: for all tasks to finish.</pre> <pre class="cython line score-0"> <span class="">551</span>: :return: ``True`` if all tasks have finished; if ``timeout`` was given and expired before</pre> <pre class="cython line score-0"> <span class="">552</span>: all tasks finished, ``False``.</pre> <pre class="cython line score-0"> <span class="">553</span>: </pre> <pre class="cython line score-0"> <span class="">554</span>: .. versionchanged:: 1.1a1</pre> <pre class="cython line score-0"> <span class="">555</span>: Add the *timeout* parameter.</pre> <pre class="cython line score-0"> <span class="">556</span>: '''</pre> <pre class="cython line score-14" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">557</span>: return self._cond.wait(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->_cond), __pyx_n_s_wait);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __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, 557, __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) < 0) <span class='error_goto'>__PYX_ERR(0, 557, __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, 557, __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"> <span class="">558</span>: </pre> <pre class="cython line score-0"> <span class="">559</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">560</span>: class Channel(object):</pre> <pre class='cython code score-0 '>struct __pyx_vtabstruct_6gevent_6_queue_Channel { PyObject *(*get)(struct __pyx_obj_6gevent_6_queue_Channel *, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_7Channel_get *__pyx_optional_args); PyObject *(*get_nowait)(struct __pyx_obj_6gevent_6_queue_Channel *, int __pyx_skip_dispatch); PyObject *(*_schedule_unlock)(struct __pyx_obj_6gevent_6_queue_Channel *); }; static struct __pyx_vtabstruct_6gevent_6_queue_Channel *__pyx_vtabptr_6gevent_6_queue_Channel; </pre><pre class="cython line score-0"> <span class="">561</span>: </pre> <pre class="cython line score-0"> <span class="">562</span>: __slots__ = (</pre> <pre class="cython line score-15" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">563</span>: 'getters',</pre> <pre class='cython code score-15 '> if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_slots, __pyx_tuple__70) < 0) <span class='error_goto'>__PYX_ERR(0, 562, __pyx_L1_error)</span> <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); /* … */ __pyx_tuple__70 = <span class='py_c_api'>PyTuple_Pack</span>(5, __pyx_n_s_getters, __pyx_n_s_putters, __pyx_n_s_hub, __pyx_n_s_event_unlock, __pyx_n_s_weakref);<span class='error_goto'> if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 563, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__70); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__70); </pre><pre class="cython line score-0"> <span class="">564</span>: 'putters',</pre> <pre class="cython line score-0"> <span class="">565</span>: 'hub',</pre> <pre class="cython line score-0"> <span class="">566</span>: '_event_unlock',</pre> <pre class="cython line score-0"> <span class="">567</span>: '__weakref__',</pre> <pre class="cython line score-0"> <span class="">568</span>: )</pre> <pre class="cython line score-0"> <span class="">569</span>: </pre> <pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">570</span>: def __init__(self, maxsize=1):</pre> <pre class='cython code score-23 '>/* Python wrapper */ static int __pyx_pw_6gevent_6_queue_7Channel_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6gevent_6_queue_7Channel_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_maxsize = 0; int __pyx_r; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_maxsize,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_int_1); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_maxsize); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) <span class='error_goto'>__PYX_ERR(0, 570, __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_maxsize = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("__init__", 0, 0, 1, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 570, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6gevent_6_queue_7Channel___init__(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self), __pyx_v_maxsize); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static int __pyx_pf_6gevent_6_queue_7Channel___init__(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self, PyObject *__pyx_v_maxsize) { 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_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.__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-0"> <span class="">571</span>: # We take maxsize to simplify certain kinds of code</pre> <pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">572</span>: if maxsize != 1:</pre> <pre class='cython code score-5 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyInt_NeObjC</span>(__pyx_v_maxsize, __pyx_int_1, 1, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 572, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { /* … */ } </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">573</span>: raise ValueError("Channels have a maxsize of 1")</pre> <pre class='cython code score-10 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_builtin_ValueError, __pyx_tuple__6, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_1, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='error_goto'>__PYX_ERR(0, 573, __pyx_L1_error)</span> /* … */ __pyx_tuple__6 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_kp_s_Channels_have_a_maxsize_of_1);<span class='error_goto'> if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 573, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__6); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__6); </pre><pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">574</span>: self.getters = collections.deque()</pre> <pre class='cython code score-22 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_collections);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_deque);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 574, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && 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_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 574, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->getters); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->getters); __pyx_v_self->getters = __pyx_t_1; __pyx_t_1 = 0; </pre><pre class="cython line score-22" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">575</span>: self.putters = collections.deque()</pre> <pre class='cython code score-22 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_4, __pyx_n_s_collections);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 575, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_deque);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__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_1)) <span class='error_goto'>__PYX_ERR(0, 575, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->putters); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->putters); __pyx_v_self->putters = __pyx_t_1; __pyx_t_1 = 0; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">576</span>: self.hub = get_hub()</pre> <pre class='cython code score-19 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_get_hub);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__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_1)) <span class='error_goto'>__PYX_ERR(0, 576, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->hub); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->hub); __pyx_v_self->hub = __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="">577</span>: self._event_unlock = None</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_None); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_event_unlock); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_event_unlock); __pyx_v_self->_event_unlock = Py_None; </pre><pre class="cython line score-0"> <span class="">578</span>: </pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">579</span>: def __repr__(self):</pre> <pre class='cython code score-7 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_3__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_2__repr__(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_2__repr__(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__repr__", 0); /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-37" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">580</span>: return '<%s at %s %s>' % (type(self).__name__, hex(id(self)), self._format())</pre> <pre class='cython code score-37 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_id, ((PyObject *)__pyx_v_self));<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_builtin_hex, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __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_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_format);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 580, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(3);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 0, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 1, __pyx_t_3); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 2, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_s_at_s_s_2, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">581</span>: </pre> <pre class="cython line score-6" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">582</span>: def __str__(self):</pre> <pre class='cython code score-6 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_5__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_5__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_queue_7Channel_4__str__(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_4__str__(struct __pyx_obj_6gevent_6_queue_Channel *__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_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.__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-31" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">583</span>: return '<%s %s>' % (type(self).__name__, self._format())</pre> <pre class='cython code score-31 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_format);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 583, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 0, __pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_s_s_2, __pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __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; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">584</span>: </pre> <pre class="cython line score-25" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">585</span>: def _format(self):</pre> <pre class='cython code score-25 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_7_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_6_format[] = "Channel._format(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_7_format = {"_format", (PyCFunction)__pyx_pw_6gevent_6_queue_7Channel_7_format, METH_NOARGS, __pyx_doc_6gevent_6_queue_7Channel_6_format}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_7_format(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_format (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_6_format(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_6_format(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_format", 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_4); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel._format", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__71 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_result);<span class='error_goto'> if (unlikely(!__pyx_tuple__71)) __PYX_ERR(0, 585, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__71); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__71); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_7_format, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel__format, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__72));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_format, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 585, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); __pyx_codeobj__72 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_format, 585, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 585, __pyx_L1_error)</span> </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">586</span>: result = ''</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_kp_s__3); __pyx_v_result = __pyx_kp_s__3; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">587</span>: if self.getters:</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 587, __pyx_L1_error)</span> if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">588</span>: result += ' getters[%s]' % len(self.getters)</pre> <pre class='cython code score-32 '> __pyx_t_2 = __pyx_v_self->getters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_3 = <span class='py_c_api'>PyObject_Length</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 588, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_getters_s_2, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='py_c_api'>PyNumber_InPlaceAdd</span>(__pyx_v_result, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(<span class='py_c_api'>PyString_CheckExact</span>(__pyx_t_2))||(<span class='py_c_api'>PyErr_Format</span>(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) <span class='error_goto'>__PYX_ERR(0, 588, __pyx_L1_error)</span> <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-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">589</span>: if self.putters:</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 589, __pyx_L1_error)</span> if (__pyx_t_1) { /* … */ } </pre><pre class="cython line score-32" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">590</span>: result += ' putters[%s]' % len(self.putters)</pre> <pre class='cython code score-32 '> __pyx_t_2 = __pyx_v_self->putters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); __pyx_t_3 = <span class='py_c_api'>PyObject_Length</span>(__pyx_t_2);<span class='error_goto'> if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 590, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='py_c_api'>PyInt_FromSsize_t</span>(__pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_putters_s_2, __pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = <span class='py_c_api'>PyNumber_InPlaceAdd</span>(__pyx_v_result, __pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(<span class='py_c_api'>PyString_CheckExact</span>(__pyx_t_2))||(<span class='py_c_api'>PyErr_Format</span>(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) <span class='error_goto'>__PYX_ERR(0, 590, __pyx_L1_error)</span> <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-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">591</span>: return result</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_result); __pyx_r = __pyx_v_result; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">592</span>: </pre> <pre class="cython line score-0"> <span class="">593</span>: @property</pre> <pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">594</span>: def balance(self):</pre> <pre class='cython code score-3 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_7balance_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_7balance_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_queue_7Channel_7balance___get__(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_7balance___get__(struct __pyx_obj_6gevent_6_queue_Channel *__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_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.balance.__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-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">595</span>: return len(self.putters) - len(self.getters)</pre> <pre class='cython code score-20 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_v_self->putters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_2 = <span class='py_c_api'>PyObject_Length</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 595, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_v_self->getters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = <span class='py_c_api'>PyObject_Length</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 595, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = <span class='py_c_api'>PyInt_FromSsize_t</span>((__pyx_t_2 - __pyx_t_3));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">596</span>: </pre> <pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">597</span>: def qsize(self):</pre> <pre class='cython code score-20 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_9qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_8qsize[] = "Channel.qsize(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_9qsize = {"qsize", (PyCFunction)__pyx_pw_6gevent_6_queue_7Channel_9qsize, METH_NOARGS, __pyx_doc_6gevent_6_queue_7Channel_8qsize}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_9qsize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("qsize (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_8qsize(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_8qsize(CYTHON_UNUSED struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("qsize", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__73 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 597, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__73); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__73); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_9qsize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_qsize, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__74));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 597, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_qsize, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 597, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); __pyx_codeobj__74 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_qsize, 597, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 597, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">598</span>: return 0</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_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">599</span>: </pre> <pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">600</span>: def empty(self):</pre> <pre class='cython code score-20 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_11empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_10empty[] = "Channel.empty(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_11empty = {"empty", (PyCFunction)__pyx_pw_6gevent_6_queue_7Channel_11empty, METH_NOARGS, __pyx_doc_6gevent_6_queue_7Channel_10empty}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_11empty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("empty (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_10empty(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_10empty(CYTHON_UNUSED struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("empty", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__75 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 600, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__75); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__75); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_11empty, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_empty, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__76));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_empty, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 600, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); __pyx_codeobj__76 = (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__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_empty, 600, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 600, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">601</span>: return True</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>(Py_True); __pyx_r = Py_True; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">602</span>: </pre> <pre class="cython line score-20" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">603</span>: def full(self):</pre> <pre class='cython code score-20 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_13full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_12full[] = "Channel.full(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_13full = {"full", (PyCFunction)__pyx_pw_6gevent_6_queue_7Channel_13full, METH_NOARGS, __pyx_doc_6gevent_6_queue_7Channel_12full}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_13full(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("full (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_12full(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_12full(CYTHON_UNUSED struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("full", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__77 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 603, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__77); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__77); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_13full, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_full, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__78));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_full, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 603, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); __pyx_codeobj__78 = (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__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_full, 603, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 603, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">604</span>: return True</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>(Py_True); __pyx_r = Py_True; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">605</span>: </pre> <pre class="cython line score-61" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">606</span>: def put(self, item, block=True, timeout=None):</pre> <pre class='cython code score-61 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_15put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_14put[] = "Channel.put(self, item, block=True, timeout=None)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_15put = {"put", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_7Channel_15put, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_7Channel_14put}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_15put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_item = 0; PyObject *__pyx_v_block = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_item,&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_True); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_item)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "put") < 0)) <span class='error_goto'>__PYX_ERR(0, 606, __pyx_L3_error)</span> } } else { switch (<span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)) { case 3: values[2] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_item = values[0]; __pyx_v_block = values[1]; __pyx_v_timeout = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; <span class='pyx_c_api'>__Pyx_RaiseArgtupleInvalid</span>("put", 0, 1, 3, <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args)); <span class='error_goto'>__PYX_ERR(0, 606, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.put", __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_queue_7Channel_14put(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self), __pyx_v_item, __pyx_v_block, __pyx_v_timeout); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_14put(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_block, PyObject *__pyx_v_timeout) { PyObject *__pyx_v_getter = NULL; struct __pyx_obj_6gevent_8__waiter_Waiter *__pyx_v_waiter = NULL; PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put", 0); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_item); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_timeout); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_getter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_waiter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_result); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_item); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_timeout); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__79 = <span class='py_c_api'>PyTuple_Pack</span>(7, __pyx_n_s_self, __pyx_n_s_item, __pyx_n_s_block, __pyx_n_s_timeout, __pyx_n_s_getter, __pyx_n_s_waiter_2, __pyx_n_s_result);<span class='error_goto'> if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 606, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__79); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__79); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_15put, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_put, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__80));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_put_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 606, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); __pyx_codeobj__80 = (PyObject*)<span class='pyx_c_api'>__Pyx_PyCode_New</span>(4, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_2, 606, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 606, __pyx_L1_error)</span> </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">607</span>: if self.hub is getcurrent():</pre> <pre class='cython code score-19 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_getcurrent);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <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, 607, __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 = (__pyx_v_self->hub == __pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">608</span>: if self.getters:</pre> <pre class='cython code score-2 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_5 < 0)) <span class='error_goto'>__PYX_ERR(0, 608, __pyx_L1_error)</span> if (__pyx_t_5) { /* … */ } </pre><pre class="cython line score-18" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">609</span>: getter = self.getters.popleft()</pre> <pre class='cython code score-18 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->getters, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 609, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_getter = __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="">610</span>: getter.switch(item)</pre> <pre class='cython code score-17 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_getter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_v_item); <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, 610, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">611</span>: return</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; </pre><pre class="cython line score-5" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">612</span>: raise Full</pre> <pre class='cython code score-5 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_1, __pyx_n_s_Full);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_t_1, 0, 0, 0); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='error_goto'>__PYX_ERR(0, 612, __pyx_L1_error)</span> </pre><pre class="cython line score-0"> <span class="">613</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">614</span>: if not block:</pre> <pre class='cython code score-2 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_block); if (unlikely(__pyx_t_5 < 0)) <span class='error_goto'>__PYX_ERR(0, 614, __pyx_L1_error)</span> __pyx_t_4 = ((!__pyx_t_5) != 0); if (__pyx_t_4) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">615</span>: timeout = 0</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_int_0); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_timeout, __pyx_int_0); </pre><pre class="cython line score-0"> <span class="">616</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">617</span>: waiter = Waiter() # pylint:disable=undefined-variable</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(((PyObject *)__pyx_ptype_6gevent_8__waiter_Waiter));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_waiter = ((struct __pyx_obj_6gevent_8__waiter_Waiter *)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">618</span>: item = (item, waiter)</pre> <pre class='cython code score-10 '> __pyx_t_1 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_item); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_item); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 0, __pyx_v_item); <span class='pyx_macro_api'>__Pyx_INCREF</span>(((PyObject *)__pyx_v_waiter)); <span class='refnanny'>__Pyx_GIVEREF</span>(((PyObject *)__pyx_v_waiter)); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_1, 1, ((PyObject *)__pyx_v_waiter)); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_item, __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="">619</span>: self.putters.append(item)</pre> <pre class='cython code score-2 '> __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_v_self->putters, __pyx_v_item);<span class='error_goto'> if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 619, __pyx_L1_error)</span> </pre><pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">620</span>: timeout = Timeout._start_new_or_dummy(timeout, Full)</pre> <pre class='cython code score-46 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_Timeout);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_start_new_or_dummy);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __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; <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_Full);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_7 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_7)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <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_3, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_timeout, __pyx_t_2}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_timeout, __pyx_t_2}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_9 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_8);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 620, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); if (__pyx_t_7) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_7); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } <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_9, 0+__pyx_t_8, __pyx_v_timeout); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 1+__pyx_t_8, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_3, __pyx_t_9, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_timeout, __pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-10" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">621</span>: try:</pre> <pre class='cython code score-10 '> /*try:*/ { { /*try:*/ { /* … */ } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L14_try_end; __pyx_L9_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_10, __pyx_t_11, __pyx_t_12); goto __pyx_L7_error; __pyx_L14_try_end:; } } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">622</span>: if self.getters:</pre> <pre class='cython code score-2 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_4 < 0)) <span class='error_goto'>__PYX_ERR(0, 622, __pyx_L9_error)</span> if (__pyx_t_4) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">623</span>: self._schedule_unlock()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Channel *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L9_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" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">624</span>: result = waiter.get()</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_8__waiter_Waiter *)__pyx_v_waiter->__pyx_vtab)->get(__pyx_v_waiter, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_result = __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="">625</span>: if result is not waiter:</pre> <pre class='cython code score-0 '> __pyx_t_4 = (__pyx_v_result != ((PyObject *)__pyx_v_waiter)); __pyx_t_5 = (__pyx_t_4 != 0); if (unlikely(__pyx_t_5)) { /* … */ } </pre><pre class="cython line score-30" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">626</span>: raise InvalidSwitchError("Invalid switch into Channel.put: %r" % (result, ))</pre> <pre class='cython code score-30 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_3, __pyx_n_s_InvalidSwitchError);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_9 = <span class='py_c_api'>PyTuple_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 626, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_result); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_result); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_9, 0, __pyx_v_result); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyString_Format</span>(__pyx_kp_s_Invalid_switch_into_Channel_put, __pyx_t_9);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_9 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_9)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_9); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_2) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 626, __pyx_L9_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_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, 626, __pyx_L9_error)</span> </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">627</span>: except:</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.put", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) <span class='error_goto'>__PYX_ERR(0, 627, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); </pre><pre class="cython line score-3" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">628</span>: _safe_remove(self.putters, item)</pre> <pre class='cython code score-3 '> __pyx_t_9 = __pyx_v_self->putters; <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_9); __pyx_t_7 = __pyx_f_6gevent_6_queue__safe_remove(__pyx_t_9, __pyx_v_item);<span class='error_goto'> if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 628, __pyx_L11_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_7); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_7); __pyx_t_7 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">629</span>: raise</pre> <pre class='cython code score-2 '> <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_2); <span class='pyx_c_api'>__Pyx_ErrRestoreWithState</span>(__pyx_t_1, __pyx_t_3, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; <span class='error_goto'>__PYX_ERR(0, 629, __pyx_L11_except_error)</span> } __pyx_L11_except_error:; </pre><pre class="cython line score-0"> <span class="">630</span>: finally:</pre> <pre class="cython line score-58" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">631</span>: timeout.cancel()</pre> <pre class='cython code score-58 '> /*finally:*/ { /*normal exit:*/{ __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_timeout, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 631, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L8; } __pyx_L7_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_9); __pyx_t_9 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_7); __pyx_t_7 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_17); __pyx_t_8 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_14 = __pyx_filename; { __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_timeout, __pyx_n_s_cancel);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L20_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 631, __pyx_L20_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_16, __pyx_t_17); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_12, __pyx_t_11, __pyx_t_10); __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_14; goto __pyx_L1_error; __pyx_L20_error:; if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_15); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_16); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_15, __pyx_t_16, __pyx_t_17); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; goto __pyx_L1_error; } __pyx_L8:; } </pre><pre class="cython line score-0"> <span class="">632</span>: </pre> <pre class="cython line score-27" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">633</span>: def put_nowait(self, item):</pre> <pre class='cython code score-27 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_17put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_16put_nowait[] = "Channel.put_nowait(self, item)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_17put_nowait = {"put_nowait", (PyCFunction)__pyx_pw_6gevent_6_queue_7Channel_17put_nowait, METH_O, __pyx_doc_6gevent_6_queue_7Channel_16put_nowait}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_17put_nowait(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put_nowait (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_16put_nowait(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_16put_nowait(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("put_nowait", 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_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.put_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__81 = <span class='py_c_api'>PyTuple_Pack</span>(2, __pyx_n_s_self, __pyx_n_s_item);<span class='error_goto'> if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 633, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__81); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__81); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_17put_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_put_nowait, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__82));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 633, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_put_nowait, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 633, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); __pyx_codeobj__82 = (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__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_put_nowait, 633, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 633, __pyx_L1_error)</span> </pre><pre class="cython line score-40" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">634</span>: self.put(item, False)</pre> <pre class='cython code score-40 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_put_2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_item, Py_False}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_item, Py_False}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); } else #endif { __pyx_t_5 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_4);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 634, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); if (__pyx_t_3) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_item); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_item); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 0+__pyx_t_4, __pyx_v_item); <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_False); <span class='refnanny'>__Pyx_GIVEREF</span>(Py_False); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_5, 1+__pyx_t_4, Py_False); __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_5, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-0"> <span class="">635</span>: </pre> <pre class="cython line score-112" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">636</span>: def get(self, block=True, timeout=None):</pre> <pre class='cython code score-112 '>static PyObject *__pyx_pw_6gevent_6_queue_7Channel_19get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_7Channel_get(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_6gevent_6_queue_7Channel_get *__pyx_optional_args) { PyObject *__pyx_v_block = ((PyObject *)Py_True); PyObject *__pyx_v_timeout = ((PyObject *)Py_None); PyObject *__pyx_v_item = NULL; PyObject *__pyx_v_putter = NULL; struct __pyx_obj_6gevent_8__waiter_Waiter *__pyx_v_waiter = NULL; 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->__pyx_n > 0) { __pyx_v_block = __pyx_optional_args->block; if (__pyx_optional_args->__pyx_n > 1) { __pyx_v_timeout = __pyx_optional_args->timeout; } } } <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_timeout); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __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_queue_7Channel_19get)) { <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 && 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, 636, __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, 636, __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, 636, __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, 636, __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 && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_item); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_putter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>((PyObject *)__pyx_v_waiter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_timeout); <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_queue_7Channel_19get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_18get[] = "Channel.get(self, block=True, timeout=None)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_19get = {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6gevent_6_queue_7Channel_19get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6gevent_6_queue_7Channel_18get}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_19get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_block = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_timeout,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)Py_True); values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = <span class='py_macro_api'>PyTuple_GET_SIZE</span>(__pyx_args); switch (pos_args) { case 2: values[1] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = <span class='py_c_api'>PyDict_Size</span>(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_block); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = <span class='pyx_c_api'>__Pyx_PyDict_GetItemStr</span>(__pyx_kwds, __pyx_n_s_timeout); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(<span class='pyx_c_api'>__Pyx_ParseOptionalKeywords</span>(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) <span class='error_goto'>__PYX_ERR(0, 636, __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, 636, __pyx_L3_error)</span> __pyx_L3_error:; <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.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_queue_7Channel_18get(((struct __pyx_obj_6gevent_6_queue_Channel *)__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_queue_7Channel_18get(struct __pyx_obj_6gevent_6_queue_Channel *__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_queue_Channel->get(__pyx_v_self, 1, &__pyx_t_2);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __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._queue.Channel.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__83 = <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__83)) __PYX_ERR(0, 636, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__83); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__83); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_19get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_get, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__84));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 636, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_get_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 636, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); __pyx_codeobj__84 = (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__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get_2, 636, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 636, __pyx_L1_error)</span> </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">637</span>: if self.hub is getcurrent():</pre> <pre class='cython code score-19 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_getcurrent);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <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, 637, __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_7 = (__pyx_v_self->hub == __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="">638</span>: if self.putters:</pre> <pre class='cython code score-2 '> __pyx_t_8 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_8 < 0)) <span class='error_goto'>__PYX_ERR(0, 638, __pyx_L1_error)</span> if (__pyx_t_8) { /* … */ } </pre><pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">639</span>: item, putter = self.putters.popleft()</pre> <pre class='cython code score-62 '> __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->putters, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_2))) { __pyx_t_3 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_2, __pyx_t_3) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) <span class='error_goto'>__PYX_ERR(0, 639, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; if ((likely(<span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_t_1))) || (<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; Py_ssize_t size = <span class='pyx_c_api'>__Pyx_PySequence_SIZE</span>(sequence); if (unlikely(size != 2)) { if (size > 2) <span class='pyx_c_api'>__Pyx_RaiseTooManyValuesError</span>(2); else if (size >= 0) <span class='pyx_c_api'>__Pyx_RaiseNeedMoreValuesError</span>(size); <span class='error_goto'>__PYX_ERR(0, 639, __pyx_L1_error)</span> } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(<span class='py_c_api'>PyTuple_CheckExact</span>(sequence))) { __pyx_t_2 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 0); __pyx_t_3 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 1); } else { __pyx_t_2 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 0); __pyx_t_3 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 1); } <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_3); #else __pyx_t_2 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 0);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 1);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_t_1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 639, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); if (<span class='pyx_c_api'>__Pyx_IternextUnpackEndCheck</span>(__pyx_t_9(__pyx_t_6), 2) < 0) <span class='error_goto'>__PYX_ERR(0, 639, __pyx_L1_error)</span> __pyx_t_9 = NULL; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = NULL; if (<span class='pyx_c_api'>__Pyx_IterFinish</span>() == 0) <span class='pyx_c_api'>__Pyx_RaiseNeedMoreValuesError</span>(index); <span class='error_goto'>__PYX_ERR(0, 639, __pyx_L1_error)</span> __pyx_L6_unpacking_done:; } __pyx_v_item = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_putter = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">640</span>: self.hub.loop.run_callback(putter.switch, putter)</pre> <pre class='cython code score-46 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->hub, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_3, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_putter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && 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_5 = 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_v_putter}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __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; } 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_v_putter}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __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; } else #endif { __pyx_t_4 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); if (__pyx_t_6) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 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_4, 0+__pyx_t_5, __pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_putter); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_putter); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_4, 1+__pyx_t_5, __pyx_v_putter); __pyx_t_3 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_2, __pyx_t_4, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">641</span>: return item</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_item); __pyx_r = __pyx_v_item; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">642</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">643</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 < 0)) <span class='error_goto'>__PYX_ERR(0, 643, __pyx_L1_error)</span> __pyx_t_7 = ((!__pyx_t_8) != 0); if (__pyx_t_7) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">644</span>: timeout = 0</pre> <pre class='cython code score-2 '> <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_int_0); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_timeout, __pyx_int_0); </pre><pre class="cython line score-0"> <span class="">645</span>: </pre> <pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">646</span>: waiter = Waiter() # pylint:disable=undefined-variable</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(((PyObject *)__pyx_ptype_6gevent_8__waiter_Waiter));<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_waiter = ((struct __pyx_obj_6gevent_8__waiter_Waiter *)__pyx_t_1); __pyx_t_1 = 0; </pre><pre class="cython line score-46" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">647</span>: timeout = Timeout._start_new_or_dummy(timeout, Empty)</pre> <pre class='cython code score-46 '> <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_Timeout);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_2, __pyx_n_s_start_new_or_dummy);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_c_api'>__Pyx_GetModuleGlobalName</span>(__pyx_t_2, __pyx_n_s_Empty);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && 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_5 = 1; } } #if CYTHON_FAST_PYCALL if (<span class='py_c_api'>PyFunction_Check</span>(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_timeout, __pyx_t_2}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (<span class='pyx_c_api'>__Pyx_PyFastCFunction_Check</span>(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_timeout, __pyx_t_2}; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyCFunction_FastCall</span>(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = <span class='py_c_api'>PyTuple_New</span>(2+__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 647, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (__pyx_t_3) { <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; } <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_v_timeout); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_v_timeout); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 0+__pyx_t_5, __pyx_v_timeout); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_2); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_4, __pyx_t_6, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; } <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_v_timeout, __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="">648</span>: try:</pre> <pre class='cython code score-9 '> /*try:*/ { { /*try:*/ { /* … */ } __pyx_L11_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; /* … */ <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_10, __pyx_t_11, __pyx_t_12); goto __pyx_L9_error; __pyx_L15_try_return:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_10, __pyx_t_11, __pyx_t_12); goto __pyx_L8_return; } } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">649</span>: self.getters.append(waiter)</pre> <pre class='cython code score-2 '> __pyx_t_13 = <span class='pyx_c_api'>__Pyx_PyObject_Append</span>(__pyx_v_self->getters, ((PyObject *)__pyx_v_waiter));<span class='error_goto'> if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 649, __pyx_L11_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">650</span>: if self.putters:</pre> <pre class='cython code score-2 '> __pyx_t_7 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_7 < 0)) <span class='error_goto'>__PYX_ERR(0, 650, __pyx_L11_error)</span> if (__pyx_t_7) { /* … */ } </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">651</span>: self._schedule_unlock()</pre> <pre class='cython code score-1 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Channel *)__pyx_v_self->__pyx_vtab)->_schedule_unlock(__pyx_v_self);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L11_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-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">652</span>: return waiter.get()</pre> <pre class='cython code score-1 '> <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_8__waiter_Waiter *)__pyx_v_waiter->__pyx_vtab)->get(__pyx_v_waiter, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L11_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L15_try_return; </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">653</span>: except:</pre> <pre class='cython code score-4 '> /*except:*/ { <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel.get", __pyx_clineno, __pyx_lineno, __pyx_filename); if (<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_1, &__pyx_t_4, &__pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 653, __pyx_L13_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">654</span>: self.getters.remove(waiter)</pre> <pre class='cython code score-17 '> __pyx_t_3 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->getters, __pyx_n_s_remove);<span class='error_goto'> if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L13_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_14 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_14)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_14); <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_14) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_14, ((PyObject *)__pyx_v_waiter)) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, ((PyObject *)__pyx_v_waiter)); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 654, __pyx_L13_except_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">655</span>: raise</pre> <pre class='cython code score-2 '> <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_1); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_4); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_ErrRestoreWithState</span>(__pyx_t_1, __pyx_t_4, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_6 = 0; <span class='error_goto'>__PYX_ERR(0, 655, __pyx_L13_except_error)</span> } __pyx_L13_except_error:; </pre><pre class="cython line score-0"> <span class="">656</span>: finally:</pre> <pre class="cython line score-59" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">657</span>: timeout.close()</pre> <pre class='cython code score-59 '> /*finally:*/ { __pyx_L9_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_14); __pyx_t_14 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); __pyx_t_3 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) <span class='pyx_c_api'>__Pyx_ExceptionSwap</span>(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); if ((PY_MAJOR_VERSION < 3) || unlikely(<span class='pyx_c_api'>__Pyx_GetException</span>(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10) < 0)) <span class='pyx_c_api'>__Pyx_ErrFetch</span>(&__pyx_t_12, &__pyx_t_11, &__pyx_t_10); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_10); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_18); <span class='refnanny'>__Pyx_XGOTREF</span>(__pyx_t_19); __pyx_t_5 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_timeout, __pyx_n_s_close);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L21_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_6 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 657, __pyx_L21_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; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; } if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_18); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_19); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_17, __pyx_t_18, __pyx_t_19); } <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_12); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_11); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_10); <span class='pyx_c_api'>__Pyx_ErrRestore</span>(__pyx_t_12, __pyx_t_11, __pyx_t_10); __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L1_error; __pyx_L21_error:; if (PY_MAJOR_VERSION >= 3) { <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_17); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_18); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_t_19); <span class='pyx_c_api'>__Pyx_ExceptionReset</span>(__pyx_t_17, __pyx_t_18, __pyx_t_19); } <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_12); __pyx_t_12 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_11); __pyx_t_11 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; goto __pyx_L1_error; } __pyx_L8_return: { __pyx_t_19 = __pyx_r; __pyx_r = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_timeout, __pyx_n_s_close);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_1 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_1)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_6 = (__pyx_t_1) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_1) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) <span class='error_goto'>__PYX_ERR(0, 657, __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; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_19; __pyx_t_19 = 0; goto __pyx_L0; } } </pre><pre class="cython line score-0"> <span class="">658</span>: </pre> <pre class="cython line score-62" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">659</span>: def get_nowait(self):</pre> <pre class='cython code score-62 '>static PyObject *__pyx_pw_6gevent_6_queue_7Channel_21get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_6gevent_6_queue_7Channel_get_nowait(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self, int __pyx_skip_dispatch) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_nowait", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self)))))); else { PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_get_nowait);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_6gevent_6_queue_7Channel_21get_nowait)) { <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_3))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_3, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) <span class='error_goto'>__PYX_ERR(0, 659, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_<span class='py_c_api'>PyObject_GetDictPtr</span>(((PyObject *)__pyx_v_self))) : 0; if (unlikely(type_dict_guard != tp_dict_version)) { tp_dict_version = obj_dict_version = 0; } #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } #endif } /* … */ /* function exit code */ __pyx_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._queue.Channel.get_nowait", __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_queue_7Channel_21get_nowait(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_20get_nowait[] = "Channel.get_nowait(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_21get_nowait = {"get_nowait", (PyCFunction)__pyx_pw_6gevent_6_queue_7Channel_21get_nowait, METH_NOARGS, __pyx_doc_6gevent_6_queue_7Channel_20get_nowait}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_21get_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_queue_7Channel_20get_nowait(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_20get_nowait(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("get_nowait", 0); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_r); __pyx_t_1 = __pyx_f_6gevent_6_queue_7Channel_get_nowait(__pyx_v_self, 1);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_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._queue.Channel.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__85 = <span class='py_c_api'>PyTuple_Pack</span>(1, __pyx_n_s_self);<span class='error_goto'> if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 659, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__85); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__85); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_21get_nowait, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel_get_nowait, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__86));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 659, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_get_nowait, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 659, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); __pyx_codeobj__86 = (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__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_gevent_queue_py, __pyx_n_s_get_nowait, 659, __pyx_empty_bytes);<span class='error_goto'> if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 659, __pyx_L1_error)</span> </pre><pre class="cython line score-1" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">660</span>: return self.get(False)</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.block = Py_False; __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Channel *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0, &__pyx_t_5);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">661</span>: </pre> <pre class="cython line score-28" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">662</span>: def _unlock(self):</pre> <pre class='cython code score-28 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_23_unlock(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_6gevent_6_queue_7Channel_22_unlock[] = "Channel._unlock(self)"; static PyMethodDef __pyx_mdef_6gevent_6_queue_7Channel_23_unlock = {"_unlock", (PyCFunction)__pyx_pw_6gevent_6_queue_7Channel_23_unlock, METH_NOARGS, __pyx_doc_6gevent_6_queue_7Channel_22_unlock}; static PyObject *__pyx_pw_6gevent_6_queue_7Channel_23_unlock(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_unlock (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_22_unlock(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_22_unlock(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_v_getter = NULL; PyObject *__pyx_v_item = NULL; PyObject *__pyx_v_putter = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_unlock", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel._unlock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_getter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_item); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_v_putter); <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } /* … */ __pyx_tuple__87 = <span class='py_c_api'>PyTuple_Pack</span>(4, __pyx_n_s_self, __pyx_n_s_getter, __pyx_n_s_item, __pyx_n_s_putter);<span class='error_goto'> if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 662, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_tuple__87); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_tuple__87); /* … */ __pyx_t_6 = <span class='pyx_c_api'>__Pyx_CyFunction_NewEx</span>(&__pyx_mdef_6gevent_6_queue_7Channel_23_unlock, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Channel__unlock, NULL, __pyx_n_s_gevent__queue, __pyx_d, ((PyObject *)__pyx_codeobj__88));<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_unlock, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 662, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); </pre><pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">663</span>: while self.putters and self.getters:</pre> <pre class='cython code score-4 '> while (1) { __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->putters); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 663, __pyx_L1_error)</span> if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->getters); if (unlikely(__pyx_t_2 < 0)) <span class='error_goto'>__PYX_ERR(0, 663, __pyx_L1_error)</span> __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (!__pyx_t_1) break; </pre><pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">664</span>: getter = self.getters.popleft()</pre> <pre class='cython code score-19 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->getters, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 664, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_getter, __pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-64" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">665</span>: item, putter = self.putters.popleft()</pre> <pre class='cython code score-64 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->putters, __pyx_n_s_popleft);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_4))) { __pyx_t_5 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_4, __pyx_t_5) : <span class='pyx_c_api'>__Pyx_PyObject_CallNoArg</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 665, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if ((likely(<span class='py_c_api'>PyTuple_CheckExact</span>(__pyx_t_3))) || (<span class='py_c_api'>PyList_CheckExact</span>(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; Py_ssize_t size = <span class='pyx_c_api'>__Pyx_PySequence_SIZE</span>(sequence); if (unlikely(size != 2)) { if (size > 2) <span class='pyx_c_api'>__Pyx_RaiseTooManyValuesError</span>(2); else if (size >= 0) <span class='pyx_c_api'>__Pyx_RaiseNeedMoreValuesError</span>(size); <span class='error_goto'>__PYX_ERR(0, 665, __pyx_L1_error)</span> } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(<span class='py_c_api'>PyTuple_CheckExact</span>(sequence))) { __pyx_t_4 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 0); __pyx_t_5 = <span class='py_macro_api'>PyTuple_GET_ITEM</span>(sequence, 1); } else { __pyx_t_4 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 0); __pyx_t_5 = <span class='py_macro_api'>PyList_GET_ITEM</span>(sequence, 1); } <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_5); #else __pyx_t_4 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 0);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='py_macro_api'>PySequence_ITEM</span>(sequence, 1);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 665, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); #endif <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = <span class='py_c_api'>PyObject_GetIter</span>(__pyx_t_3);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 665, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed; <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); if (<span class='pyx_c_api'>__Pyx_IternextUnpackEndCheck</span>(__pyx_t_7(__pyx_t_6), 2) < 0) <span class='error_goto'>__PYX_ERR(0, 665, __pyx_L1_error)</span> __pyx_t_7 = NULL; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8_unpacking_done; __pyx_L7_unpacking_failed:; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (<span class='pyx_c_api'>__Pyx_IterFinish</span>() == 0) <span class='pyx_c_api'>__Pyx_RaiseNeedMoreValuesError</span>(index); <span class='error_goto'>__PYX_ERR(0, 665, __pyx_L1_error)</span> __pyx_L8_unpacking_done:; } <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_item, __pyx_t_4); __pyx_t_4 = 0; <span class='pyx_macro_api'>__Pyx_XDECREF_SET</span>(__pyx_v_putter, __pyx_t_5); __pyx_t_5 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">666</span>: getter.switch(item)</pre> <pre class='cython code score-17 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_getter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_item) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_v_item); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 666, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; </pre><pre class="cython line score-17" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">667</span>: putter.switch(putter)</pre> <pre class='cython code score-17 '> __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_putter, __pyx_n_s_switch);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_4 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_putter) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_v_putter); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 667, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_3); __pyx_t_3 = 0; } </pre><pre class="cython line score-0"> <span class="">668</span>: </pre> <pre class="cython line score-7" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">669</span>: def _schedule_unlock(self):</pre> <pre class='cython code score-7 '>static PyObject *__pyx_f_6gevent_6_queue_7Channel__schedule_unlock(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("_schedule_unlock", 0); /* … */ /* function exit code */ __pyx_r = Py_None; <span class='pyx_macro_api'>__Pyx_INCREF</span>(Py_None); goto __pyx_L0; __pyx_L1_error:; <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); <span class='pyx_c_api'>__Pyx_AddTraceback</span>("gevent._queue.Channel._schedule_unlock", __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-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">670</span>: if not self._event_unlock:</pre> <pre class='cython code score-2 '> __pyx_t_1 = <span class='pyx_c_api'>__Pyx_PyObject_IsTrue</span>(__pyx_v_self->_event_unlock); if (unlikely(__pyx_t_1 < 0)) <span class='error_goto'>__PYX_ERR(0, 670, __pyx_L1_error)</span> __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { /* … */ } </pre><pre class="cython line score-23" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">671</span>: self._event_unlock = self.hub.loop.run_callback(self._unlock)</pre> <pre class='cython code score-23 '> __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_v_self->hub, __pyx_n_s_loop);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_5 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(__pyx_t_4, __pyx_n_s_run_callback);<span class='error_goto'> if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 671, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = <span class='pyx_c_api'>__Pyx_PyObject_GetAttrStr</span>(((PyObject *)__pyx_v_self), __pyx_n_s_unlock);<span class='error_goto'> if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(<span class='py_c_api'>PyMethod_Check</span>(__pyx_t_5))) { __pyx_t_6 = <span class='py_macro_api'>PyMethod_GET_SELF</span>(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = <span class='py_macro_api'>PyMethod_GET_FUNCTION</span>(__pyx_t_5); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(function); <span class='pyx_macro_api'>__Pyx_DECREF_SET</span>(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : <span class='pyx_c_api'>__Pyx_PyObject_CallOneArg</span>(__pyx_t_5, __pyx_t_4); <span class='pyx_macro_api'>__Pyx_XDECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) <span class='error_goto'>__PYX_ERR(0, 671, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_3); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_5); __pyx_t_5 = 0; <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_3); <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_v_self->_event_unlock); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_v_self->_event_unlock); __pyx_v_self->_event_unlock = __pyx_t_3; __pyx_t_3 = 0; </pre><pre class="cython line score-0"> <span class="">672</span>: </pre> <pre class="cython line score-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">673</span>: def __iter__(self):</pre> <pre class='cython code score-0 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_25__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_25__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_24__iter__(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_24__iter__(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__iter__", 0); /* … */ /* function exit code */ __pyx_L0:; <span class='refnanny'>__Pyx_XGIVEREF</span>(__pyx_r); <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">674</span>: return self</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>(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">675</span>: </pre> <pre class="cython line score-4" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">676</span>: def __next__(self):</pre> <pre class='cython code score-4 '>/* Python wrapper */ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_27__next__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6gevent_6_queue_7Channel_27__next__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__next__ (wrapper)", 0); __pyx_r = __pyx_pf_6gevent_6_queue_7Channel_26__next__(((struct __pyx_obj_6gevent_6_queue_Channel *)__pyx_v_self)); /* function exit code */ <span class='refnanny'>__Pyx_RefNannyFinishContext</span>(); return __pyx_r; } static PyObject *__pyx_pf_6gevent_6_queue_7Channel_26__next__(struct __pyx_obj_6gevent_6_queue_Channel *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; <span class='refnanny'>__Pyx_RefNannyDeclarations</span> <span class='refnanny'>__Pyx_RefNannySetupContext</span>("__next__", 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._queue.Channel.__next__", __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-0" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">677</span>: result = self.get()</pre> <pre class='cython code score-0 '> __pyx_t_1 = ((struct __pyx_vtabstruct_6gevent_6_queue_Channel *)__pyx_v_self->__pyx_vtab)->get(__pyx_v_self, 0, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_v_result = __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="">678</span>: if result is StopIteration:</pre> <pre class='cython code score-0 '> __pyx_t_2 = (__pyx_v_result == __pyx_builtin_StopIteration); __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { /* … */ } </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">679</span>: raise result</pre> <pre class='cython code score-2 '> <span class='pyx_c_api'>__Pyx_Raise</span>(__pyx_v_result, 0, 0, 0); <span class='error_goto'>__PYX_ERR(0, 679, __pyx_L1_error)</span> </pre><pre class="cython line score-2" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">680</span>: return result</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_result); __pyx_r = __pyx_v_result; goto __pyx_L0; </pre><pre class="cython line score-0"> <span class="">681</span>: </pre> <pre class="cython line score-13" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">682</span>: next = __next__ # Py2</pre> <pre class='cython code score-13 '> <span class='pyx_c_api'>__Pyx_GetNameInClass</span>(__pyx_t_6, (PyObject *)__pyx_ptype_6gevent_6_queue_Channel, __pyx_n_s_next);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>((PyObject *)__pyx_ptype_6gevent_6_queue_Channel->tp_dict, __pyx_n_s_next_2, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 682, __pyx_L1_error)</span> <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; <span class='py_c_api'>PyType_Modified</span>(__pyx_ptype_6gevent_6_queue_Channel); </pre><pre class="cython line score-0"> <span class="">683</span>: </pre> <pre class="cython line score-19" onclick="(function(s){s.display=s.display==='block'?'none':'block'})(this.nextElementSibling.style)">+<span class="">684</span>: from gevent._util import import_c_accel</pre> <pre class='cython code score-19 '> __pyx_t_6 = <span class='py_c_api'>PyList_New</span>(1);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <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_6, 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_6, 0);<span class='error_goto'> if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = <span class='pyx_c_api'>__Pyx_ImportFrom</span>(__pyx_t_1, __pyx_n_s_import_c_accel);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); if (<span class='py_c_api'>PyDict_SetItem</span>(__pyx_d, __pyx_n_s_import_c_accel, __pyx_t_6) < 0) <span class='error_goto'>__PYX_ERR(0, 684, __pyx_L1_error)</span> <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_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="">685</span>: import_c_accel(globals(), 'gevent._queue')</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, 685, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_1); __pyx_t_6 = <span class='pyx_c_api'>__Pyx_Globals</span>();<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 685, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); __pyx_t_2 = <span class='py_c_api'>PyTuple_New</span>(2);<span class='error_goto'> if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_2); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_t_6); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 0, __pyx_t_6); <span class='pyx_macro_api'>__Pyx_INCREF</span>(__pyx_n_s_gevent__queue); <span class='refnanny'>__Pyx_GIVEREF</span>(__pyx_n_s_gevent__queue); <span class='py_macro_api'>PyTuple_SET_ITEM</span>(__pyx_t_2, 1, __pyx_n_s_gevent__queue); __pyx_t_6 = 0; __pyx_t_6 = <span class='pyx_c_api'>__Pyx_PyObject_Call</span>(__pyx_t_1, __pyx_t_2, NULL);<span class='error_goto'> if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 685, __pyx_L1_error)</span> <span class='refnanny'>__Pyx_GOTREF</span>(__pyx_t_6); <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_1); __pyx_t_1 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_2); __pyx_t_2 = 0; <span class='pyx_macro_api'>__Pyx_DECREF</span>(__pyx_t_6); __pyx_t_6 = 0; </pre></div></body></html>