unnecessary calling g_main_context_wakeup_unlocked in g_source_attach


	Here is the last few lines in g_source_attach in gmain.c:

  while (tmp_list)
          g_main_context_add_poll_unlocked (context, source->priority,
          tmp_list = tmp_list->next;

      #ifdef G_THREADS_ENABLED
       /* Now wake up the main loop if it is waiting in
	 * the poll() */
      g_main_context_wakeup_unlocked (context);

     UNLOCK_CONTEXT (context);

       return result;

However,since calling g_main_context_add_poll_unlocked each time will
also call g_main_context_wakeup_unlocked ,so isn't the call to
g_main_context_wakeup_unlocked in g_source_attach unnecessary? :)

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