You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the initial state of each new process spawned in the process pool is the initial state of the controller process. This is why "global" variables are passed as arguments to any functions within the process pool, which is inefficient. It was a quirk of developing the software on a Mac.
Using multiprocessing.set_start_method('fork') for the process pool would eliminate the need to pass “global” variables between functions. It results in each spawned process inheriting the current state of the parent process. Because this only works on Unix-related systems and not Windows/Mac OS, the OS should be queried at initialisation to ensure this will work. Data integrity across multiple processes remains a problem, however, so it would be best if only “parameters” were global, and anything changeable were treated as “volatile”. Appropriate semaphores and temporary files may eliminate the latter altogether. Return values can then be restricted to logging, which can be collected by the controller process.
The text was updated successfully, but these errors were encountered:
Currently, the initial state of each new process spawned in the process pool is the initial state of the controller process. This is why "global" variables are passed as arguments to any functions within the process pool, which is inefficient. It was a quirk of developing the software on a Mac.
Using
multiprocessing.set_start_method('fork')
for the process pool would eliminate the need to pass “global” variables between functions. It results in each spawned process inheriting the current state of the parent process. Because this only works on Unix-related systems and not Windows/Mac OS, the OS should be queried at initialisation to ensure this will work. Data integrity across multiple processes remains a problem, however, so it would be best if only “parameters” were global, and anything changeable were treated as “volatile”. Appropriate semaphores and temporary files may eliminate the latter altogether. Return values can then be restricted to logging, which can be collected by the controller process.The text was updated successfully, but these errors were encountered: