Commit 5eb91f644cf8710ffa8edbc467c822d41781d91c
1 parent
fe149d00
Exists in
master
Using spawn in surface creation
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
invesalius/data/surface.py
... | ... | @@ -665,7 +665,8 @@ class SurfaceManager(): |
665 | 665 | n_pieces = int(round(matrix.shape[0] / piece_size + 0.5, 0)) |
666 | 666 | |
667 | 667 | filenames = [] |
668 | - pool = multiprocessing.Pool(processes=min(n_pieces, n_processors)) | |
668 | + ctx = multiprocessing.get_context('spawn') | |
669 | + pool = ctx.Pool(processes=min(n_pieces, n_processors)) | |
669 | 670 | manager = multiprocessing.Manager() |
670 | 671 | msg_queue = manager.Queue(1) |
671 | 672 | ... | ... |