PolarizedLightFieldMicroscopy / napari-LF

Light field imaging plugin for napari
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Quitting napari does not end QTimer thread #38

Closed amitabhverma closed 1 year ago

amitabhverma commented 1 year ago

We use this thread to run some periodic processes and checks like checking for existing filenames, directory changes, etc.

https://github.com/PolarizedLightFieldMicroscopy/napari-LF/blob/76f7d2a72c7f55a657f0f6d6fb02ac258bd3d5fd/src/napari_lf/_widgetLF_gui.py#L1229-L1231

The exiting of the QTimer should be handled at the time of closing event but that is not fired in napari https://github.com/PolarizedLightFieldMicroscopy/napari-LF/blob/76f7d2a72c7f55a657f0f6d6fb02ac258bd3d5fd/src/napari_lf/_widgetLF.py#L324

This results is when napari is quit, the thread continue and does not allow a clean exit.

amitabhverma commented 1 year ago

Testing shows caused by fix implemented in #29

amitabhverma commented 1 year ago

Fixed in https://github.com/PolarizedLightFieldMicroscopy/napari-LF/commit/6fecb290d34c9aed2409b350eea99d619be5d356

The non-availability of closeEvent can be raised in another issue, for now hideEvent is being used for plugin exit functions.