Closed zakv closed 2 years ago
@zakv @chrisjbillington This looks fine to me, but I do have a question. Could we not just add these missing methods as blank passes in the PluginTab
class as well? I can certainly imagine their functionality being useful at some point for plugins, and it may also help if we ever get around to merging the PluginTab
and DeviceTab
classes to have them be more similar. Thoughts?
I haven't thought super hard about it, so feel free to tell me that is a bad idea.
Sorry for the slow response, I'm a bit short on time at the moment. I do think your suggestion would be the most reasonable thing to do for the class methods. I'm not as sure what to do with the required attributes state
and shutdown_workers_complete
though. Maybe there is a reasonable way to handle those if they are added to the PluginTab
class. I haven't had a chance to dig through the code again but from my comment here it seemed like they were necessary in the current implementation.
Fair enough. I should have read the bug report thread more carefully. Dealing with missing attributes as well is probably just complicated enough that I'd rather not touch it now, so this is the better method. I'll go ahead and merge it.
Fixes #86 using Chris's suggestion there.
In short, the issue was that blacs failed to close when a
PluginTab
was used because that class doesn't haveshutdown_workers()
andfinalise_close_tab()
methods. This PR works around that by having blacs only call those methods on tabs that actually have them.