Browse Source

Threading

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

2
README.md

@ -2074,7 +2074,7 @@ with lock:
### Semaphore, Event, Barrier ### Semaphore, Event, Barrier
```python ```python
<Semaphore> = Semaphore(value=1) # Lock that can be acquired 'value' times.
<Semaphore> = Semaphore(value=1) # Lock that can be acquired by 'value' threads.
<Event> = Event() # Method wait() blocks until set() is called. <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'.
``` ```

2
index.html

@ -1855,7 +1855,7 @@ CompletedProcess(args=[<span class="hljs-string">'bc'</span>, <span class="hljs-
... ...
</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 '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 by 'value' threads.</span>
&lt;Event&gt; = Event() <span class="hljs-comment"># Method wait() blocks until set() is called.</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> </code></pre></div>

Loading…
Cancel
Save