Re: Warnings/Errors during Threaded Execution

Mark Richardson wrote:
I'm guessing that you're accessing some widgets in a separate thread (or in your callbacks). Whenever you do this, you need to lock the widgets so that you're not modifying them while they are trying to be drawn. So in a callback, you need
// the code that is needed for the callback
or, when you're in the thread that you started, you need to do the same thing anytime that you're accessing widgets. One last thing, in your main program, make sure that you do the following...
This way, the main loop runs correctly with threads. I can't promise that this is the textbook example of how to work with multithreads, but it's what I got working after many hours of trial & error.

There are docs on this, so it's not necessary to just try stuff ;-)

also, the question here is more appropriate for gtk-list/gtk-app-devel-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]