Browse Source

Threading

pull/42/head
Jure Šorn 5 years ago
parent
commit
b6ba018f80
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -1958,7 +1958,7 @@ from collections import deque
Threading
---------
* **CPython interpreter can only run a single thread at the time.**
* **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 there is an I/O operation in the thread.**
```python
from threading import Thread, RLock

2
index.html

@ -1728,7 +1728,7 @@ db = connector.connect(host=<str>, user=<str>, password=<str>,
&lt;deque&gt;.rotate(n=<span class="hljs-number">1</span>) <span class="hljs-comment"># Rotates elements to the right.</span>
</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 the time.</strong></li>
<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 there is an I/O operation in the thread.</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