### Method

# Gio Task get_context

since: 2.36

#### Declaration [src]

    GMainContext*
    g_task_get_context (
      GTask* task
    )

#### Description [src]

Gets the `GMainContext` that `task` will return its result in (that is, the context that was the thread-default main context (see `g_main_context_push_thread_default()`) at the point when `task` was created).

This will always return a non-`NULL` value, even if the task’s context is the default `GMainContext`.

Available since: 2.36

#### Return value

Type: `GMainContext`

`task`‘s `GMainContext`.

The returned data is owned by the instance.