Skip to content

Commit

Permalink
lint for process.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyleung521 committed Jun 22, 2022
1 parent 1d6e5da commit d89b279
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/westpa/work_managers/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@

class ProcessWorkManager(WorkManager):
'''A work manager using the ``multiprocessing`` module.
Notes
-----
On MacOS, as of Python 3.8 the default start method for multiprocessing launching new processes was changed from fork to spawn.
On MacOS, as of Python 3.8 the default start method for multiprocessing launching new processes was changed from fork to spawn.
In general, spawn is more robust and efficient, however it requires serializability of everything being passed to the child process.
In contrast, fork is much less memory efficient, as it makes a full copy of everything in the parent process.
In contrast, fork is much less memory efficient, as it makes a full copy of everything in the parent process.
However, it does not require picklability.
So, on MacOS, the method for launching new processes is explicitly changed to fork from the (MacOS-specific) default of spawn.
Unix should default to fork.
See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods and
See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods and
https://docs.python.org/3/library/multiprocessing.html#the-spawn-and-forkserver-start-methods for more details.
'''

Expand Down

0 comments on commit d89b279

Please sign in to comment.