I need to run in another thread very long task, because when I do it in main thread, then UI freeze until this tasks ends.
Now when user press button, then everything is done at once in function at once.
I want when user press search button create a new thread which will execute very long functions, and when it ends, prints results to GUI.
But GTK support drawing only in one thread, so I can’t simply create UI from another thread because it will crash application.
So how I can handle it?
Should I check in each frame if thread ends?