Re: Gtk thread inside application.



On Tue, 8 Oct 2002 14:58:59 -0400
mquezada nlxcorp com wrote:

   > gtk_main_quit();

        Why are you calling gtk_main_quit() from this thread? Shouldn't be
called from the GTK_thread?

   >       errcode = pthread_cancel(GTK_thread);
   >       if((errcode=pthread_join(GTK_thread, NULL)))
   >       {
   >          fprintf( stderr,"pthread_join Error => %s\n",
strerror(errcode));
   >       }
   >       else
   >       {
   >          // End GUI
   >          GTK_RUNNING = FALSE;
   >       }
   > 
   > where GTK_thread is the result from pthread_create executed
earlier.

        I am not sure that you mean by "...is the result from...". If
GTK_thread is the return value of pthread_create, then this will not
work, as the return value is not the new pid.

                -- Mitko




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