Closed zakv closed 2 years ago
Thanks for the report. It was always silly that the PluginTab duplicates code rather than inheriting or otherwise, hence this was missed when modifying the main tab class to shutdown worker processes more cleanly.
Probably the caller should just not call the shutdown_workers
method unless it exists.
I briefly took a look at how hard it would be to change up the inheritance structure and it looks like it requires more knowledge of blacs internals than I have. I think your solution is pretty reasonable though and I'll probably get a chance to implement it in the next few days.
PluginTab
seems to be missing some methods and attributes that blacs expects tabs to have. When using a class based on the example from here, everything works as expected until blacs is closed. At that point the error below is raised and blacs fails to exit. While failing to exit it keeps logging"INFO BLACS: destroy called"
.To get blacs to exit properly I had to add the methods
shutdown_workers(self)
andfinalise_close_tab(self, *args, **kwargs)
, as well as add the attributesstate
andshutdown_workers_complete
. Those methods don't need to do anything, but they need to be there to avoid theAttributeError
and allow blacs to exit. Maybe the best solution is to just add these methods/attributes toPluginTab
?On a related note, the plugin tab doesn't have an icon and its text is black instead of blue, as expected from the link above.