File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -631,11 +631,7 @@ def parallel_exec_transform_with_prettyprint( # noqa: C901
631631 # Let's just use a dummy synchronous executor.
632632 jobs = 1
633633 pool_impl = DummyExecutor
634- elif getattr (sys , "_is_gil_enabled" , lambda : False )(): # pyre-ignore[16]
635- from concurrent .futures import ThreadPoolExecutor
636-
637- pool_impl = functools .partial (ThreadPoolExecutor , max_workers = jobs )
638- else :
634+ elif getattr (sys , "_is_gil_enabled" , lambda : True )(): # pyre-ignore[16]
639635 from concurrent .futures import ProcessPoolExecutor
640636
641637 pool_impl = functools .partial (ProcessPoolExecutor , max_workers = jobs )
@@ -648,6 +644,10 @@ def parallel_exec_transform_with_prettyprint( # noqa: C901
648644 else PartialParserConfig ()
649645 ),
650646 )
647+ else :
648+ from concurrent .futures import ThreadPoolExecutor
649+
650+ pool_impl = functools .partial (ThreadPoolExecutor , max_workers = jobs )
651651
652652 successes : int = 0
653653 failures : int = 0
You can’t perform that action at this time.
0 commit comments