The Global Interpreter Lock (GIL) ensures only one OS thread executes Python bytecode at once, so threads don’t speed up pure-Python CPU loops. Use asyncio for high-concurrency network I/O on one thread, threads for blocking C/I/O libraries (since C extensions and socket I/O release the GIL), and multiprocessing for CPU-bound work.
Follow-up Interview Question · How do numpy or C extensions bypass the GIL while running heavy math?