Python Threads and Concurrency: Difference between revisions
Jump to navigation
Jump to search
(→TODO) |
|||
Line 6: | Line 6: | ||
<font color='darkkhaki'> | <font color='darkkhaki'> | ||
* PROCESS [[PyOOP]] "Concurrency" + "Threads" + "The many problems with threads" + "Shared memory" + "The global interpreter lock" + "Thread overhead" + "Multiprocessing" + "Multiprocessing pools" + "Queues" + "The problems with multiprocessing" + "Futures" + "AsyncIO" + "AsyncIO in action" + "Reading an AsyncIO Future" + "AsyncIO for networking" + "Using executors to wrap blocking code" + "Streams" + "Executors" + "AsyncIO clients" + "Case Study" | * PROCESS [[PyOOP]] "Concurrency" + "Threads" + "The many problems with threads" + "Shared memory" + "The global interpreter lock" + "Thread overhead" + "Multiprocessing" + "Multiprocessing pools" + "Queues" + "The problems with multiprocessing" + "Futures" + "AsyncIO" + "AsyncIO in action" + "Reading an AsyncIO Future" + "AsyncIO for networking" + "Using executors to wrap blocking code" + "Streams" + "Executors" + "AsyncIO clients" + "Case Study" | ||
* Develop [[Python_Global_Interpreter_Lock_(GIL)|Python Global Interpreter Lock (GIL)]] | |||
* [[Python_Global_Interpreter_Lock_(GIL)|Python Global Interpreter Lock (GIL)]] | |||
</font> | </font> | ||
Revision as of 23:13, 14 May 2024
Internal
TODO
- PROCESS PyOOP "Concurrency" + "Threads" + "The many problems with threads" + "Shared memory" + "The global interpreter lock" + "Thread overhead" + "Multiprocessing" + "Multiprocessing pools" + "Queues" + "The problems with multiprocessing" + "Futures" + "AsyncIO" + "AsyncIO in action" + "Reading an AsyncIO Future" + "AsyncIO for networking" + "Using executors to wrap blocking code" + "Streams" + "Executors" + "AsyncIO clients" + "Case Study"
- Develop Python Global Interpreter Lock (GIL)
Overview
Python is not the best choice for building highly concurrent, multi-threaded applications, particularly applications with many CPU-bound threads. The main reason for this is Python's Global Interpreter Lock (GIL), a mechanisms that prevents the interpreter from executing more than one instruction at a time, even in the presence of multiple cores.