Advanced
Python
Q92 / 101
What is the CPython GIL's switch interval?
Correct! Well done.
Incorrect.
The correct answer is A) The GIL switches every 100 bytecodes (legacy) or every 5ms (Python 3.2+)
A
Correct Answer
The GIL switches every 100 bytecodes (legacy) or every 5ms (Python 3.2+)
Explanation
Python 3.2+ uses a 5ms (sys.getswitchinterval()) interval. The GIL is released for I/O and C extensions. Multi-threaded pure-Python CPU code is effectively serialized.
Progress
92/101