breaking from gtk_main_iteration



I have a program with 2 threads.  The gui thread is essentially:

void guithread(){
  for(;;){
    gtk_main_iteration();
    do_internal_processing();
  }
}

The other thread, worker thread, is sometimes spawned by
do_internal_processing, and does not use gtk at all. It is
essentially:

void workerthread(){
  do_long_calcluation();
  send_result_to_gui_thread();
}

 The problem is: send_result_to_gui_thread 's results are to be
processed by guithread's do_internal_processing.  How do I make
gtk_main_iteration return immediately when send_result_to_gui_thread
is called, instead of waiting some time?



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