标签:worker work val 实现 back finish when roc proc
下边代码段是关于python通过multiprocessing 实现带回调函数的异步调用的代码。from multiprocessing import Pool
def f(x):
if __name__ == ‘__main__‘:
pool = Pool(processes=1) # Start a worker processes.
result = pool.apply_async(f, [10], callback) # Evaluate "f(10)" asynchronously calling callback when finished.
python通过multiprocessing 实现带回调函数的异步调用的代码
标签:worker work val 实现 back finish when roc proc
原文地址:http://blog.51cto.com/14176413/2348696