[gtkmm] Using threads ...



Hi all,

I'm doing a program that has a lot of
threads, and all this threads can
change the state of the main window
(for example, change a text of a
entry, create a messagedialog, ...).
I'd like to known if i need to use
Glib::Dispatcher all the time i need
to change something in screen and if
so, how can i wait for something
happen (the dispatcher notification
happens asynchronously). The biggest
problem is that in this system there
is only on service to show a
"messagedialog" for example, and all
the threads call this service to show
the dialog, and either the main thread
or the other threads can call this
function.

Example:
Imagine that the main thread creates a
service that can show a dialog.
Another thread is started and call
this service waiting for response.
After this the main thread call this
service too.
I can't use mutex for locking because
the main thread can call this service
causing it to stop.

Any idea is appreciate
Best regards,
Andre


__________________________________________________________________________
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/





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