标签:main get play style 调用 port rom art tput
import time from multiprocessing import Queue, Process def f(q): q.put([time.asctime(), ‘from Eva‘, ‘hello‘]) # 调用主函数中p进程传递过来的进程参数,puy函数为向队列中添加一条数据。 if __name__ == ‘__main__‘: q = Queue() # 创建一个Queue对象 p = Process(target=f, args=(q,)) # 创建一个进程 p.start() print(q.get()) p.join()
macname@MacdeMacBook-Pro py % python3 cccccc.py [‘Tue Mar 24 18:53:04 2020‘, ‘from Eva‘, ‘hello‘] macname@MacdeMacBook-Pro py %
标签:main get play style 调用 port rom art tput
原文地址:https://www.cnblogs.com/sea-stream/p/14192829.html