Closed Dyr-El closed 3 years ago
If you have a long calculation in your main thread, you can call app.processEvents()
frequently to avoid an unresponsive GUI.
Multi-thread support or similar is not adressed yet. I don't know how it should work or what needs to be done.
For GUIs it is always a problem how to handle a process that takes more time than the user would like to wait. If I would like to have a big calculation to be done on user request. How would I handle that in NiGui? Even if I could break it up in chunks I would have no way to trigger a part of it in the main loop. If I run it in a separate thread I would need to poll the result in a timer to get it into the GUI.
(Or maybe I have just missed something, but I didn’t find any example that addresses this and the API is not very forthcoming on this. Actually there is nothing on the thread safety of the GUI either)