GTK and threaded applications



Following the guidelines in the FAQ, I constructed my application threads as follows:

  gdk_threads_enter();                //  enter thread
       (do some work, including GTK calls)
  gdk_flush();                            //  exit thread
gdk_threads_leave(); return 0;

Now my multi-threaded application executes its threads one after the other, instead of in parallel. Apparently the above method introduces a lock or mutex which allows only one thread at a time to execute.

Is this a hopeless situation, or is there some other way?
(other than putting all GTK calls in the main program)

thanks,
Mike




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