Open Christian-B opened 1 month ago
A work around is to force all scripts (for Window users) to have if name == 'main':"
Yes many Python tutorials do highly recommend that.
It would however break out script check code which depends on the script being written the (some would say sloppy) way without the if name == name
the main problem is that many users scripts do not have the if name == main:
launch_keepalive_task https://github.com/SpiNNakerManchester/SpiNNMan/blob/cdfc5e40fbced5be33f0c8dff7d3f83d38943bad/spinnman/spalloc/spalloc_client.py#L671
On a windows machine was causing the whole script to restart.
This was found to be caused by spawn https://docs.python.org/3/library/multiprocessing.html
The problem is that spawn creates a new python instants and import all the code running.
If the start script does not have "if name == 'main':" this will cause the script to restart!