g_main_context_check: can it update wakeup first and then check it?
- From: cee1 <fykcee1 gmail com>
- To: Developers Developers <gtk-devel-list gnome org>
- Subject: g_main_context_check: can it update wakeup first and then check it?
- Date: Fri, 11 Dec 2015 19:59:03 +0800
Hi all,
"""
g_main_context_check()
{
...
if (context->wake_up_rec.revents)
g_wakeup_acknowledge (context->wakeup);
...
while (pollrec && i < n_fds)
{
...
fds[i].revents & (pollrec->fd->events | G_IO_ERR |
G_IO_HUP | G_IO_NVAL);
}
"""
i.e. it will first check context->wakeup, and then update the revents,
which will defer processing of eventfd to the next iteration...
Any reason to do this?
--
Regards,
- cee1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]