Re: Usage of gtk_main_iteration_do ()



Harring Figueiredo wrote:

 If you need to do something based on time, why can't you use g_timeout_add ?

I wanted only for the loop to run once every time slice of the linux scheduler.
I found the ideal function is sched_yield():

while(!gtk_main_iteration_do(0)){  // non-blocking
  a_non_blocking_function();
  sched_yield();
}




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