Browse Source

Threading

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

2
README.md

@ -2014,7 +2014,7 @@ from collections import deque
Threading
---------
* **CPython interpreter can only run a single thread at a time.**
* **That is why using multiple threads won't result in a faster execution, unless one or more threads contain an I/O operation.**
* **That is why using multiple threads won't result in a faster execution, unless at least one of the threads contains an I/O operation.**
```python
from threading import Thread, RLock
```

2
index.html

@ -1778,7 +1778,7 @@ db = connector.connect(host=<str>, user=<str>, password=<str>,
</code></pre>
<div><h2 id="threading"><a href="#threading" name="threading">#</a>Threading</h2><ul>
<li><strong>CPython interpreter can only run a single thread at a time.</strong></li>
<li><strong>That is why using multiple threads won't result in a faster execution, unless one or more threads contain an I/O operation.</strong></li>
<li><strong>That is why using multiple threads won't result in a faster execution, unless at least one of the threads contains an I/O operation.</strong></li>
</ul><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> threading <span class="hljs-keyword">import</span> Thread, RLock
</code></pre></div>

Loading…
Cancel
Save