Skip to content
Commit 1c8c408c authored by Allison Karlitskaya's avatar Allison Karlitskaya
Browse files

gmain: get rid of poll_waiting

This variable, which is the cause of much grief, exists for two reasons:

  - ensuring the the wakeup pipe doesn't fill up

  - preventing the first poll() after adding a source from waking up
    immediately

The first point is no longer an issue with GWakeup.

The second point is addressed by using different logic: we only signal a
wakeup in the case that the context is currently acquired by a thread
that is not us.

As an added bonus, we can now implement g_main_context_wakeup() without
taking a lock.

https://bugzilla.gnome.org/show_bug.cgi?id=583511
https://bugzilla.gnome.org/show_bug.cgi?id=320888
parent e15d5313
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment