g_main_context_wait: add a critical to detect use