작성한 질문수
우리를 위한 프로그래밍 : 파이썬 중급 (Inflearn Original)
병렬성 1 - Futures(4-1)
작성
·
252
0
ThreadPoolExecutor와 ProcessPoolExecutor의 인자로 둘 다 'max_workers=' 받을 수 있다고 하는데요
인터넷에서 예제들을 찾아보니
with concurrent.futures.ProcessPoolExecutor(
3
) as exe:
exe.
map
(download_image, img_urls)
이런 식으로 max_workers가 없이 숫자만 사용된 형태들도 많이 보였습니다.
이런 경우에도 max_workers=3 과 같은 의미라고 봐도 되나요??
퀴즈
파이썬에서 `yield` 키워드의 주된 역할은 무엇일까요?
예외 발생
값을 반환하고 실행 일시 중지
클래스 메서드 정의
모듈 가져오기
답변 1
네 맞습니다.
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.
Executor
None