[gtkmm] Concurrency with gtk/gtkmm

Dear All,

I would like to adapt a program I have writte using gkt/gtkmm so that it does some processing in parallel. (in particular one function is supposed to continuosly monitor the user interface while the other should respond to any change in the input signaled by the first one)

Up to now I have used idle function successfully to avoid GUI to freeze. I have tryed to use 2 idle functions hoping that this would simply and efficently put the two functions in parallel execution, but this does not work. One of the two is blocked. I have tryed a variety of values for the priority of the two (both 0, both a higher number, one lower and one higher value..).

First of all I wander: why is this not working?

Also what should I then use to have 2 or more processes in parallel?
I have seen that glib supports threads, and I have also seen POSIX.
Is there any (dis)advantage in using one or the other with gtk/gtkmm?
(I have read that gtk is not thread safe, what does this mean in practice?)

Is there any other option that i should consider?
(for this particular situation of monitoring an input, would it be worth to consider implmenting my own set of signals & handlers?)

Thank you very much in advance,
Enrico Costanza

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