Closed FrancoisPgm closed 9 months ago
Good to know! Simply removing the multithreading from the GUI will break some things currently (e.g. loading saved .gfi files) but I don't see any problems with leaving the main thread for the GUI and moving the manager to another thread. Will look into this once I get the opportunity.
@FrancoisPgm I have made the changes on the macos
branch. Could you test running goofi-pipe (and specifically loading a .gfi file) on your Mac? Let me know if this fixed the issues you were having and I will merge the PR #8.
I can run goofuipipe fine ! However when loading a file, I can load it without issue but I have some nodes red, for example with the video classification, the classification0 node has "AttributeError: 'Classifier' object has no attribute 'data_path'". It seems solvable, but it doesn't work out of the box.
Okay that's a different problem which I thought I had fixed already. Will merge then.
On a mac, launching the goofi-pipe only results in a frozen terminal, without showing any GUI. It appears that macOS excpects all GUI threads to be main threads, so the UI events are only exposed to the main threads, and the GUI elements of daemon threads are never rendered. It's a bit annoying, but it seems hard to work around that.
I naively tried to just run the window in the main thread by replacing : https://github.com/PhilippThoelke/goofi-pipe/blob/b272adbd68db6ad576ab40587f16b3b8fb64bcfc/src/goofi/gui/window.py#L409 with just
cls._instance._initialize(manager)
and it seems to run fine.I haven't looked much more into the code so I'm not sure what the main thread is doing, I guess that can be moved to a daemon thread.