Skip to content

gmain: g_main_context_release should check context owner

Wei Li requested to merge hduweili/glib:g_main_context_acquire into main

When many threads use g_main_context_acquire to get the same g_main_context, only the owner of the g_main_context will add the owner_count. But all the g_main_context_release operations will reduce the owner_count. Although we should do g_main_context_release after g_main_context_acquire return true, it is better to check context owner before reducing owner count in g_main_context_release.

Merge request reports