Re: g_timeout_add...



On Sun, 03 Oct 2004 14:13:45 +0300, Claudiu Dragalina-Paraipan
<dr clau rdslink ro> wrote:
Hello,

I am working on a multithreaded app which uses GTK libs.
I have 3 threads (including the base one), and am using g_timeout_add to
trigger a function that does some updates. Also I have several mutexes
in use.

Everything worked ok while I was using pthread library, but after I
switched to gthread, the function that should be called by g_timeout_add
is never called.

How can I fix this problem ?
Anyone can give me any direction on what to check ?

Humph,
    That should all work seemlessly, is it possible that your main
thread (the one running the GMainLoop) is blocking on a mutex ?
Did you not g_thread_init() ?

If you have an older version of gtk+, you *may* need to insert this line:
`g_main_context_wakeup(NULL);' after `g_timeout_add()' (but it should
do that by default).

Cheers,
                                                  -Tristan



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