Tech notes/concurrent futures and threadpoolexecutor
<p>In <a class="wikilink" href="/python/">Python</a>, when using the <a class="wikilink" href="/threadpoolexecutor/">ThreadPoolExecutor</a> of concurrent.futures, it is hard to know how many elements are waiting in the queue to be processed. The best I could gather is <sup id="fnref:1"><a class="footnote-ref" href="#fn:1">1</a></sup> :</p>
<pre class="codehilite"><code class="language-python">executor._work_queue
</code></pre>
<p>That is the queue where the <code>WorkItems</code> are stored. </p>
<ul>
<li>Can it be a good idea to create my own <code>PoolExecutor</code>?</li>
</ul>
<div class="footnote">
<hr />
<ol>
<li id="fn:1">
<p>https://github.com/python/cpython/blob/b5789a7419655f66692fab463320048bd2290e81/Lib/concurrent/futures/thread.py<a href="/tags/L187 "><a href="/tags/L187 "><a href="/tags/L187 ">#L187 </a></a></a><a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text">↩</a></p>
</li>
</ol>
</div>
Backlinks
These are the other notes that link to this one.
Nothing links here, how did you reach this page then?
Comment
Share your thoughts on this note. Comments are not public, they are
messages sent directly to my inbox.