Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d23e87f

Browse files
committed
Threading
1 parent 119bca5 commit d23e87f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,7 @@ from threading import Thread, RLock, Semaphore, Event, Barrier
20602060

20612061
### Lock
20622062
```python
2063-
<lock> = RLock()
2063+
<lock> = RLock() # Lock that can only be released by the owner.
20642064
<lock>.acquire() # Waits for lock to be available.
20652065
<lock>.release() # Makes the lock available again.
20662066
```

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@
18321832
<li><strong>Use <code class="python hljs"><span class="hljs-string">'kwargs=&lt;dict&gt;'</span></code> to pass keyword arguments to the function.</strong></li>
18331833
<li><strong>Use <code class="python hljs"><span class="hljs-string">'daemon=True'</span></code>, or the program will not be able to exit while the thread is alive.</strong></li>
18341834
</ul>
1835-
<div><h3 id="lock">Lock</h3><pre><code class="python language-python hljs">&lt;lock&gt; = RLock()
1835+
<div><h3 id="lock">Lock</h3><pre><code class="python language-python hljs">&lt;lock&gt; = RLock() <span class="hljs-comment"># Lock that can only be released by the owner.</span>
18361836
&lt;lock&gt;.acquire() <span class="hljs-comment"># Waits for lock to be available.</span>
18371837
&lt;lock&gt;.release() <span class="hljs-comment"># Makes the lock available again.</span>
18381838
</code></pre></div>

0 commit comments

Comments
 (0)