浅谈Python的多线程的GIL
在谈什么是GIL之前,我们来看看Python的线程例子
import threading
def worker():
"""thread worker function"""
print 'Worker'
return
threads = []
for i in range(5):
t = threading.Thread(target=worker)
threads.append(t)
t.start()