unnecessary calling g_main_context_wakeup_unlocked in g_source_attach
- From: Hing-Wah Wan <50191914 ee cityu edu hk>
- To: gtk-devel-list gnome org
- Subject: unnecessary calling g_main_context_wakeup_unlocked in g_source_attach
- Date: Sat, 30 Mar 2002 21:22:39 +0800
Hello,
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->data);
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);
#endif
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]