Skip to content

Commit ce58f42

Browse files
authored
[XEB] Multiprocessing spawn (#4090)
There are two multiprocessing "modes": fork and spawn. Fork used to always be the default. Now sometimes on Mac it defaults to spawn (?) but in any event: spawn works way better. This could prevent some of the c++-looking errors that @mrwojtek has seen. It fixed different-but-still-c++-looking-errors for me
1 parent 5fdb80d commit ce58f42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cirq-google/cirq_google/calibration/xeb_wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _maybe_multiprocessing_pool(
3838
yield None
3939
return
4040

41-
with multiprocessing.Pool(processes=n_processes) as pool:
41+
with multiprocessing.get_context('spawn').Pool(processes=n_processes) as pool:
4242
yield pool
4343

4444

0 commit comments

Comments
 (0)