If I invoke clutter_init() followed by clutter_main() on the main thread,
all is well.  However, if I immediately launch a new thread from the main
thread and on the new thread invoke clutter_init() followed by
clutter_main(), all is not well: the context poll function is constantly
invoked with no event in the clutter event queue, causing the process to
consume nearly all available processor bandwidth. I don't see why?

Normal case works as expected:

   int main( int   argc,  char *argv[])
   {
      ...
      clutter_init();
      clutter_main();
      ...
   }

Launching from another thread does not:

   static void* startOnOtherThread(void* arg)
   {
      ...
      clutter_init();
      clutter_main();
      ...
   }

   int main( int   argc,  char *argv[])
   {
      ...
      if (!g_thread_get_initialized())
      {
          g_thread_init(NULL);
          clutter_threads_init();
      }

      if ((gThread = g_thread_create(startOnOtherThread, &data, TRUE,
&error)) == NULL)
      {
         printf("can't start clutter launch on a different thread\n");
      }
      else
      {
         g_thread_join(gThread);
      }
      ...
   }

My system is OSX and I am using the OSX backend.  I've reduced a problem
I've been working on to this simple case.  I could sure use some help here.

Thanks,

Brian
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to