multi process 에러 질문입니다.
2268
작성한 질문수 8
if __name__ == "__main__":
worker = min(10, len(process_list))
# 시작 시간
start_tm = time.time()
# Futures
futures_list = []
with ProcessPoolExecutor(max_workers=worker) as excutor:
for process_item in process_list:
# future 반환
future = excutor.submit(CODE_EXEC, process_item)
futures_list.append(future)
print('Scheduled for {} : {}'.format(process_list, future))
# as_completed 결과 출력
for future in as_completed(futures_list):
result = future.result()
done = future.done()
cancelled = future.cancelled
# future 결과 확인
print('Future Result : {}, Done : {}'.format(result, done))
print('Future Cancelled : {}'.format(cancelled))
답변 1
1
worker의 줄여보시고 사용자의 프로세스의 수 또는 cpu 코어
운영체제의 실행 상태에 따라서 실행이 안 될 수도 있어요!
worker의 수를 줄여서 최적의 실행 환경을 찾아보세요
코드상의 예외가 아니라 운영체제에서 발생하는 에러는 제어할 수 없어여~
진도미확인 (진도가 안 넘어감)
0
51
1
RuntimeError: There is no current event loop in thread 'MainThread'
0
94
1
chapter 07-01 실행 오류
0
77
1
Chapter05-04 : sum_func의 합이 이중 출력됩니다.
0
90
2
45. 병렬성 2 - Futures(5-1) wait가 의도된 대로 동작하지 않습니다.
0
108
2
멀티스레딩 - 44. 병렬성 1 - Futures(4-2)
0
79
2
chapter05_02 클로저 질문사항 !
0
60
1
LV1 설정
0
95
2
매직 메소드의 호출 방법 차이 문의
0
139
2
왜 numbers리스트를 만들때 str으로 숫자를 감싸나요?
0
106
2
스크랩핑 실습 중 Mac OS 인증서 문제
0
137
1
AsyncIO 멀티 스크랩핑 실습 예제 관련 질문
0
176
1
강의자료가 영상과 다릅니다
0
262
2
closure.cell_contents 초기화 하기 문의
0
139
2
map함수 사용 시, list변환 방법 문의
0
352
2
__mul__ 백터 * 숫지, 백터 * 백터 처리
0
149
1
del처리후 질문입니다.
0
162
1
car_list(car1,car2,car3) 인스턴스 tuple 타입 문의
0
234
1
coroutine에 대한 질문
0
250
1
제너레이터 이터레이터 질문이 있습니다.
0
258
1
atom install package search not working
0
283
1
Magic Method - Not Implemented
0
404
1
가상환경 질문!
0
410
1
병렬처리 추가 질문이 있습니다.
0
253
1





