TypeError:'tuple'对象在python的多处理中不可调用

时间:2013-06-12 04:40:14

标签: python multiprocessing

我正在尝试使用多处理来完成一些工作。但是,我得到了那个错误。为什么会这样?以下是我的示例代码

def work(x, y):
    #doing something

def work_process(x, y):
    p = []

    for i in x:
        p.append(Process(target=work, args=(x, y)))
        p[i].start()

    for t in p:
        t.join()

    return result

1 个答案:

答案 0 :(得分:0)

我写了一些有助于调试多处理错误的内容。它可以显示其他进程中异常/错误的完整回溯。

下载RemoteException.py

import RemoteException

@RemoteException.showError
def work(x, y):
    #doing something