Browse Source

Threading

pull/52/head
Jure Šorn 4 years ago
parent
commit
11b4ae16e3
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -2072,7 +2072,7 @@ with lock:
```python
<Semaphore> = Semaphore(value=1) # Lock that can be acquired 'value' times.
<Event> = Event() # Method wait() blocks until set() is called.
<Barrier> = Barrier(n_times) # Method wait() blocks until it's called n_times.
<Barrier> = Barrier(n_times) # Method wait() blocks until it's called 'n_times'.
```
### Thread Pool Executor

2
index.html

@ -1828,7 +1828,7 @@ lock.release()
<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 'value' times.</span>
&lt;Event&gt; = Event() <span class="hljs-comment"># Method wait() blocks until set() is called.</span>
&lt;Barrier&gt; = Barrier(n_times) <span class="hljs-comment"># Method wait() blocks until it's called n_times.</span>
&lt;Barrier&gt; = Barrier(n_times) <span class="hljs-comment"># Method wait() blocks until it's called 'n_times'.</span>
</code></pre></div>
<div><h3 id="threadpoolexecutor">Thread Pool Executor</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> concurrent.futures <span class="hljs-keyword">import</span> ThreadPoolExecutor

Loading…
Cancel
Save