-
Notifications
You must be signed in to change notification settings - Fork 12
Close ni tasks #1018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close ni tasks #1018
Conversation
I would like to make the __del__ call consistent for all devices, but I will have to go through the stages to do this. Co-Authored-By: Kevin M. Dean <kevin.dean@utsouthwestern.edu>
I will clean up some of the close calls when I create an abstract base class later on.
Eliminate print statements in thread pool...
Fix the test...
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1018 +/- ##
===========================================
+ Coverage 54.32% 54.37% +0.04%
===========================================
Files 180 180
Lines 20319 20395 +76
===========================================
+ Hits 11038 11089 +51
- Misses 9281 9306 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
def __del__(self): | ||
"""Delete HamamatsuOrca class.""" | ||
pass | ||
self.close_camera() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling close_camera() here causes a DCAM error.
@annie-xd-wang - This seems to be fine now...
Tried to create a more uniform way for closing tasks so that our console isn't cluttered upon exit.
There remains one traceback from the threading library.
If we replace
raise SystemExit()
withos._exit(1)
in the following code this is eliminated completely:I was hesitant to make this change because this method apparently does not invoke the normal Python cleanup routines (like flushing I/O buffers, calling finally blocks, etc.).