• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

ThreadPoolExecutor의 max_worekers에 관한 질문입니다

21.10.19 00:11 작성 조회수 102

0

ThreadPoolExecutor와 ProcessPoolExecutor의 인자로 둘 다 'max_workers=' 받을 수 있다고 하는데요

인터넷에서 예제들을 찾아보니 

with concurrent.futures.ProcessPoolExecutor(3) as exe:
    exe.map(download_image, img_urls)
 

이런 식으로 max_workers가 없이 숫자만 사용된 형태들도 많이 보였습니다.

이런 경우에도 max_workers=3 과 같은 의미라고 봐도 되나요??

답변 1

답변을 작성해보세요.

0

네 맞습니다.

 

An Executor subclass that executes calls asynchronously using a pool of at most max_workers processes. If max_workers is None or not given, it will default to the number of processors on the machine.