# 02 · io-bound-threads **演示**:4 个各睡 0.05s 的 IO 任务,串行约 0.20s,4 线程约 0.05s;等待期间 GIL 被释放,线程可以重叠等待。 **运行**: ```sh uv run python examples/19-threading-gil-multiprocessing/02-io-bound-threads/io_bound_threads.py ``` **预期输出**(3.12.9,耗时随机器波动): ```text serial: ['done', 'done', 'done', 'done'] 0.23s threaded: ['done', 'done', 'done', 'done'] 0.06s speedup: 3.9x ``` **依赖**:仅标准库。 **注意**:`time.sleep`/网络 IO/文件 IO 会释放 GIL,所以线程有效;纯 Python 计算不会(见 01)。