i-pi-dev_archive
i-pi-dev_archive copied to clipboard
The EXIT file should be removed once used
Title says it all. Once the EXIT file triggers an exit, it should be deleted.
@ceriottm, is there any reason not to do that?
Actually perhaps no reason, except leaving a trace that the program had been stopped by generating an EXIT file. Also, I recall there were subtle issues related to the fact that there are multiple threads that should detect that a soft exit has been requested. Try to autoremove it and see if it breaks something. M
On 12 June 2015 at 21:07, Ondrej Marsalek [email protected] wrote:
@ceriottm https://github.com/ceriottm, is there any reason not to do that?
— Reply to this email directly or view it on GitHub https://github.com/ceriottm/i-pi-dev/issues/40#issuecomment-111590881.
Ah, I see, about the threads. If that causes problems, then perhaps we need to improve the threading code ;-)
The trace should be in the log file (as it currently already is).
100% agreed. I tried to do things properly, but at times I needed a quick fix, and never found the time to go back and clean my own mess. The multithreading is definitely part of that. M
On 12 June 2015 at 21:51, Ondrej Marsalek [email protected] wrote:
Ah, I see, about the threads. If that causes problems, then perhaps we need to improve the threading code ;-)
The trace should be in the log file (as it currently already is).
— Reply to this email directly or view it on GitHub https://github.com/ceriottm/i-pi-dev/issues/40#issuecomment-111598447.
As far as I can tell, the issue is that the existence of the file is checked in both the simulation main loop and in the softexit
global instance in a separate thread. That means that a race condition is certainly possible. I will prepare a PR that should address this for now and will remove the file, but for the future, I have some plans to handle this better overall.
Yeah, how to do softexit properly in a multi-threaded setting is definitely something worth doing more cleanly. This works 99.9% of the time though :-)
On 5 June 2016 at 09:14, Ondrej Marsalek [email protected] wrote:
As far as I can tell, the issue is that the existence of the file is checked in both the simulation main loop and in the softexit global instance in a separate thread. That means that a race condition is certainly possible. I will prepare a PR that should address this for now and will remove the file, but for the future, I have some plans to handle this better overall.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ceriottm/i-pi-dev/issues/40#issuecomment-223797239, or mute the thread https://github.com/notifications/unsubscribe/ABESZ-V3Z5LEUrzUkysNzmkVk7ua2zuxks5qIndngaJpZM4DH36i .