即便我什么都不做,只要调用了线程,结果竟然不是0
from threading import Thread
value=0
def val():
pass
p1=Thread(target=val)
p1.start()
print(value)
正在研究中···
在其他电脑运行相同的代码时,结果却是保持0不变
即便我什么都不做,只要调用了线程,结果竟然不是0
from threading import Thread
value=0
def val():
pass
p1=Thread(target=val)
p1.start()
print(value)
正在研究中···
在其他电脑运行相同的代码时,结果却是保持0不变