北京迅达云成科技有限公司 www.speedycloud.cn
什么是GIL?
In C-python,the global interpreter lock, or GIL, is a mutex that
prevents multiple native threads from executing Python byte-codes at
once. This lock is necessary mainly because C-Python’s memory
management is not thread-safe.(However, since the GIL exists, other
features have grown to depend on the guarantees that it enforces.)
GIL将会序列化线程,从而阻止线程并发