Browse Source

Threading

pull/152/head
Jure Šorn 2 years ago
parent
commit
eba86f4879
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -2115,7 +2115,7 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
#### Or: #### Or:
```python ```python
with <lock>: # Enters the block by calling acquire(), with <lock>: # Enters the block by calling acquire(),
... # and exits it with release().
... # and exits it with release(), even on error.
``` ```
### Semaphore, Event, Barrier ### Semaphore, Event, Barrier

2
index.html

@ -1751,7 +1751,7 @@ CompletedProcess(args=[<span class="hljs-string">'bc'</span>, <span class="hljs-
</code></pre></div> </code></pre></div>
<div><h4 id="or-1">Or:</h4><pre><code class="python language-python hljs"><span class="hljs-keyword">with</span> &lt;lock&gt;: <span class="hljs-comment"># Enters the block by calling acquire(),</span> <div><h4 id="or-1">Or:</h4><pre><code class="python language-python hljs"><span class="hljs-keyword">with</span> &lt;lock&gt;: <span class="hljs-comment"># Enters the block by calling acquire(),</span>
... <span class="hljs-comment"># and exits it with release().</span>
... <span class="hljs-comment"># and exits it with release(), even on error.</span>
</code></pre></div> </code></pre></div>
<div><h3 id="semaphoreeventbarrier">Semaphore, Event, Barrier</h3><pre><code class="python language-python hljs">&lt;Semaphore&gt; = Semaphore(value=<span class="hljs-number">1</span>) <span class="hljs-comment"># Lock that can be acquired by 'value' threads.</span> <div><h3 id="semaphoreeventbarrier">Semaphore, Event, Barrier</h3><pre><code class="python language-python hljs">&lt;Semaphore&gt; = Semaphore(value=<span class="hljs-number">1</span>) <span class="hljs-comment"># Lock that can be acquired by 'value' threads.</span>

Loading…
Cancel
Save