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
Having this change, an ImageAcquisitionManager object handles the SIGINT
signal caused by `Ctrl+c` and it gracefully terminates threads and call
sys.exit(0) once it's triggered by the signal.
I've made some improvements to the design at d97e831. I'll wait for feedback from a user. If the improvements meet his expectation, I'll close this issue.
If Harvester is running in the interactive mode, there’s no way to catch
the timing where quit() was called (then the SystemExit exception is
raised) because the responsibility is on the interactive interpreter side
such as Python or IPython. It means we can’t stop our threads by
ourselves. To avoid this situation happens, we create daemon threads
instead of non-daemon threads. This means we can’t explicitly be
responsible for cleaning up our responsible objects but at least we are
sure that our threads will never block the interpreter exits because
they're daemon threads.
This change may be relevant to the following issues:
#40#47
Describe the bug
Harvester Core blocks terminating the main script while it's acquiring images.
To Reproduce
Steps to reproduce the behavior:
Ctrl+c
.Expected behavior
Signaling an event such as
Ctrl+c
, Harvester Core should gracefully terminate itself even if it's acquiring images or not.Screenshots
None.
Desktop (please complete the following information):
None.
Additional context
None.
The text was updated successfully, but these errors were encountered: