gmain: Add GMainContextPusher convenience API
This is like GMutexLocker
, in that if you are able to use
g_autoptr()
, it makes popping a GMainContext
off the thread-default
main context stack easier when exiting a function.
Signed-off-by: Philip Withnall withnall@endlessm.com