【发布时间】:2012-02-26 13:32:39
【问题描述】:
这是我想做的伪代码。
import time
def run():
while x < 10000000:
x += 1
if __name__ == "__main__":
p = Process(run)
p.start()
time.sleep(3)
#some code that I don't know that will give me the current value of x
Pythons threading 模块似乎是要走的路,但是我还没有成功实现这个例子。
【问题讨论】:
标签: python asynchronous multiprocessing python-2.7