Browse Source

Threading

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

2
README.md

@ -2065,7 +2065,7 @@ with lock:
```
### Semaphore, Event, Barrier
```
```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.

2
index.html

@ -1822,7 +1822,7 @@ lock.release()
...
</code></pre></div>
<div><h3 id="semaphoreeventbarrier">Semaphore, Event, Barrier</h3><pre><code class="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>
<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>
</code></pre></div>

Loading…
Cancel
Save