Re: GTK and threaded applications



On Fri, 2006-02-03 at 23:14 +0100, kornelix wrote:
If I have understood the implications correctly, then writing 
multi-threaded applications with GTK may be possible, but I am almost 
ready to give it up because of the complexity and limitations. I will 
check how hard it will be to convert my application to QT or X11 Motif.

Writing multi-threaded GTK apps is done all the time and it works well
if you follow the GTK docs guidelines on threading and follow the
instructions in the post by Brian Tarricone, especially the part about
the enter/leave stuff around the gtk_main call and the thread creation
calls.

The lock up problems you've experiences really indicate that there's an
architecture problem in there somewhere.  I have a feeling until your
work out the architecture (worker threads, synchronization queues, IPC),
you'll have the same problems with QT and X11 Motif (especially Motif
since it is much older and I believe has even less threading support).
My first multi-threaded Qt program failed miserably because of my
architecture design.  So in short I think that writing multi-threaded
GUI apps just as difficult on Qt or even Windows.  But once you conquer
these initial issues I think you'll be fine on any toolkit.

If you want to submit a short example of your code to the list (that
illustrates the problems you are encountering) then I'm sure that things
can be worked out in very short order.

Michael





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