-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to macos multiprocessing spawn and context issues (#2076)
* Fix to macos multiprocessing spawn and context issues * Further fix to make fork setting be effective for the entire parsl package, to avoid any explicit handling from the end user side * Wrap mac process into a class * Fix for mypy error Co-authored-by: Ben Clifford <[email protected]>
- Loading branch information
1 parent
fbdeb59
commit e87a0aa
Showing
3 changed files
with
34 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import multiprocessing | ||
from typing import Any | ||
|
||
ForkProcess: Any = multiprocessing.get_context('fork').Process | ||
|
||
|
||
class MacSafeProcess(ForkProcess): | ||
|
||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters