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

Skip to content

Commit 9f3a103

Browse files
committed
Threading
1 parent 9ba5675 commit 9f3a103

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,6 +2015,7 @@ thread.start()
20152015
thread.join() # Waits for thread to finish.
20162016
```
20172017
* **Use `'kwargs=<dict>'` to pass keyword arguments to the function.**
2018+
* **Use `'daemon=True'` or the program will not be able to exit while the thread is alive.**
20182019

20192020
### Lock
20202021
```python

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,6 +1777,7 @@
17771777

17781778
<ul>
17791779
<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>
1780+
<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>
17801781
</ul>
17811782
<div><h3 id="lock">Lock</h3><pre><code class="python language-python hljs">lock = RLock()
17821783
lock.acquire() <span class="hljs-comment"># Waits for lock to be available.</span>

0 commit comments

Comments
 (0)