다른 입력 파일을 동시에 전달하고 싶습니다. 출력 목록에 다중 처리 관리자 인 nodes
을 사용하고 있습니다. 내가 다시 string
얻을 nodes
유형을 인쇄 할 때 AttributeError: 'str' object has no attribute 'extend'
멀티 프로세싱 목록 관리자
: 나는 목록으로 nodes
을 정의에도 불구하고 nodes = manager.list()
file_list = [file_1,file_2,file_3]
def function_x(file,nodes):
nodes.extend(some_data)
print(type(nodes))
if __name__ == "__main__":
manager = multiprocessing.Manager()
nodes = manager.list()
matches = partial(function_x,nodes)
pool = multiprocessing.Pool(processes=multiprocessing.cpu_count())
pool.map(function_x,file_list)
으로 이것을 정의하고, 나는 다음과 같은 오류를 얻고있다. nodes = manager.list()
이 올바르게 정의하지 않는 이유는 무엇입니까?