Open
Conversation
Contributor
Without stopping the thread, the IOC hangs on shutdown because the destructor of the thread objects waits for the thread to exit. This was not a problem before because the destructors never ran.
Without this, even if the camera object is destroyed, control of the camera is never properly relinquished. With some cameras, this means that it is not possible to reconnect to the camera until the previous connection times out. Deletion of stream and camera is moved from the destructor into the shutdown function so that it happens even on old asyn that doesn't destroy the driver.
b73fb18 to
c79b8c3
Compare
Author
|
Reworded commits as per areaDetector/ADCore#572 (comment) |
Author
I've tested this now with a camera that is susceptible to an unclean shutdown. With the current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This builds on top of areaDetector/ADCore#572 (see that PR for for more details on what this is about) and areaDetector/ADGenICam#49. The driver had an existing
epicsAtExithook, but the new approach properly disables the asyn port, preventing EPICS scan threads and other external actors from accessing the driver when the IOC starts shutting down.