码迷,mamicode.com
首页 > 编程语言 > 详细

Python 进程-Queue

时间:2017-10-28 21:09:25      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:pytho   hello   queue   star   ==   targe   __name__   进程   one   

from multiprocessing  import Process,Queue

def f(q):
q.put([42,None,"Hello"])

if __name__ == "__main__":
q=Queue()
p=Process(target=f,args=(q,))
p.start()
print(q.get())
p.join()

Python 进程-Queue

标签:pytho   hello   queue   star   ==   targe   __name__   进程   one   

原文地址:http://www.cnblogs.com/xiesongyou/p/7747939.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!