📜  python multiprocessing queu empty error - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:42.827000             🧑  作者: Mango

代码示例1
import multiprocessing
import queue # or Queue in Python 2

f = multiprocessing.Queue()
try:
    f.get(True,0.1)
except queue.Empty: # queue here refers to the module, not a class
    print('foo')