在Windows上运行时,我的算法有问题。由于我的脚本很长,所以这是我代码的重要部分:
`
import multiprocessing
#efficient_apriori- This module implements the Apriori algorithm
import efficient_apriori
global process
process=4
def Son_Algorithm(k):
.......
......
if __name__ == "__main__":
result_first_pass=[]
pool = multiprocessing.Pool(process)
result_first_pass = [pool.apply_async(Son_Algorithm, args=(i,)) for i in range(process)]
print("first pass", result_first_pass)
print('results',[result.get(timeout=10) for result in result_first_pass])
pool.close()
pool.join()
`