File tree Expand file tree Collapse file tree
codecov_cli/services/staticanalysis Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import asyncio
22import json
33import logging
4- import sys
54import typing
65from functools import partial
7- from multiprocessing import get_context
6+ from multiprocessing import Pool
87from pathlib import Path
98
109import click
@@ -184,15 +183,13 @@ async def process_files(
184183 all_data = {}
185184 file_metadata = []
186185 errors = {}
187- if sys .platform .startswith ("win32" ) or sys .platform .startswith ("darwin" ):
188- pool_thread_method = "spawn"
189- else :
190- pool_thread_method = "fork"
191186 with click .progressbar (
192187 length = len (files_to_analyze ),
193188 label = "Analyzing files" ,
194189 ) as bar :
195- with get_context (pool_thread_method ).Pool (processes = numberprocesses ) as pool :
190+ # https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
191+ # from the link above, we want to use the default start methods
192+ with Pool (processes = numberprocesses ) as pool :
196193 file_results = pool .imap_unordered (mapped_func , files_to_analyze )
197194 for result in file_results :
198195 bar .update (1 , result )
You can’t perform that action at this time.
0 commit comments