GLib.MainContext.prototype.is_owner

function is_owner(): Boolean {
    // Gjs wrapper for g_main_context_is_owner()
}
  

Determines whether this thread holds the (recursive) ownership of this GLib.MainContext. This is useful to know before waiting on another thread that may be blocking to get ownership of context.

Since 2.10

Returns

true if current thread is owner of context.