Hi,

I'm having some problems regarding multiples threads accessing clutter resource.

On my application I'm starting 2 threads: one to listen for the xmlrpc
requests to the server
application and other to control the application's state. The problem
is that the both threads will need to call function that will make
clutter updates on the ui.

When running the application on a single thread clutter updates
flawless, when I start one or both additional threads the programs
locks one of the threads, usually clutter main thread (white screen
when updates window).

The follow snippet shows the application structure. I've added
clutter_threads_enter/clutter_threads_leaves on various point of my
application, sometime I having limited success (got a runtime error
regarding lock).


int
main (int argc, char *argv[])
{
        ...

        g_thread_init (NULL);
        clutter_init (&argc, &argv);
        
        table = app_table_new();
        ....

        g_thread_create (state_loop, table, FALSE, NULL);
        g_thread_create (network_loop, table, FALSE, NULL);
        clutter_main ();

        return 0;
}

The table component is the a clutter component that will be accessed
by the state_loop and network_loop. Clutter events are served even
when the screen don't updates, so I think it is a lock problem. I've
removed all the clutter_threads from above code because I'm not sure
where to put it.



Thanks in advance,
Pedro Casagrande de Campos
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to