Speed and Agility: Deciphering the Secrets of Velocity

: Just work hard and leave the rest to time : Xiaopozhan Speed and Agility: Deciphering the Secrets of Velocity Preface First: Basics of Velocity template syntax Second: Variables and data rendering Third: Conditional judgment and logical implementation Fourth: Loops and Iterations Fifth: Custom instructions Sixth: Macro Seventh: File introduction Eighth: Error handling Ninth: Advanced […]

Python 3.12 officially released: performance improvements, no-GIL will be provided in 3.13

Article directory Preface Main changes type annotation More flexible f-string parsing (PEP 701) Create a GIL for each subinterpreter (PEP 684) Introduction to zero-based Python learning resources Summary of Python learning route Must-have development tools for Python Collection of 600 Python learning videos Actual cases 100 Python exercises Interview questions Data collection Foreword Python 3.12.0 […]

GIL global interpreter lock

Article directory GIL global interpreter lock 1. Introduction: 2. What are the commonly used types of Python interpreters? 1. CPython 2. IPython 3.PyPy 4.Jython 5.IronPython 3. Introduction to GIL 4. GIL and Lock 5. GIL and multi-threading Summarize GIL global interpreter lock 1. Introduction: First of all, you must understand that GIL is not a […]

Comparison of processes and threads, GIL global interpreter lock, mutex lock, thread queue, use of process pool and thread pool, multi-thread crawling of web pages, coroutine theory, coroutine to achieve high concurrency

Comparison of processes and threads 1. The overhead of the process is much greater than the overhead of the thread. 2. Data between processes is isolated, but data between threads is not isolated. 3. Thread data between multiple processes is not shared —–> Let process communication (IPC) ——-> Threads under the process also communicate —-> […]

Python coroutine, GIL global interpreter, mutex lock, thread pool, Concurrent module

The process is the smallest unit of resource allocation, and the thread is the smallest unit of CPU scheduling. There is at least one thread in every process. Python’s support for concurrent programming (1) Multi-threading: Threading uses the principle that CPU and IO can be executed at the same time, so that the CPU will […]

Coroutines, GIL global interpreter, mutex locks, thread pools, Concurrent module

The process is the smallest unit of resource allocation, and the thread is the smallest unit of CPU scheduling. There is at least one thread in every process. Python’s support for concurrent programming (1) Multi-threading: Threading uses the principle that CPU and IO can be executed at the same time, so that the CPU will […]

Python GIL and its release/acquisition functions

Python GIL and its release/acquisition functions Foreword Python uses the CPython interpreter by default, which will introduce GIL, refer to GlobalInterpreterLock: In CPython, the global interpreter lock, or GIL, is a mutex that protects access to Python objects, preventing multiple threads from executing Python bytecodes at once. In the CPython interpreter, the GIL (Global Interpreter […]

Python 3.12 officially released: performance improvements, no-GIL will be provided in 3.13

Python 3.12.0 has recently been officially released as a stable version. Key changes More flexible f-string parsing (PEP 701) Support buffer protocol (PEP 688) Introducing new debugging/profiling API (PEP 669) Support independent subinterpreters with separate global interpreter locks (PEP 684) Performance optimizations such as PEP 709 and support for the BOLT binary optimizer, expected to […]

python-GIL, deadlock recursive lock and thread supplement

1. Introduction to GIL The full name of GIL is Global Interpreter Lock, which is interpreted in Chinese as global interpreter lock. It is not a feature of Python, but a concept introduced when implementing python’s mainstream Cpython interpreter. GIL is essentially a mutex lock, which turns concurrent running into serial to control sharing at […]