0、引子:

  • 如下是一段很基础的多线程代码:
from threading import Threaddemo = 0def task(arg):global demodemo = argprint(demo)for i in range(10)