g_main_context_check: can it update wakeup first and then check it?



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]