GLib.MainContext.wait

### Method

# GLib MainContextwait

deprecated: 2.58

#### Declaration [src]

    gboolean
    g_main_context_wait (
      GMainContext* context,
      GCond* cond,
      GMutex* mutex
    )

#### Description [src]

Tries to become the owner of the specified context, and waits on `cond` if another thread is the owner.

This is the same as `g_main_context_acquire()`, but if another thread is the owner, atomically drop `mutex` and wait on `cond` until that owner releases ownership or until `cond` is signaled, then try again (once) to become the owner.

Deprecated since: 2.58

Use `g_main_context_is_owner()` and separate locking instead.

#### Parameters

`context`

  Type: `GMainContext`

  A main context (if `NULL`, the global-default main context will be used).

  The argument can be `NULL`.

`cond`

  Type: `GCond`

  A condition variable.

  The data is owned by the caller of the method.

`mutex`

  Type: `GMutex`

  A mutex, currently held.

  The data is owned by the caller of the method.

#### Return value

Type: `gboolean`

True if this thread is now the owner of `context`, false otherwise.