### Method

# Gio Task return_error_if_cancelled

since: 2.36

#### Declaration [src]

    gboolean
    g_task_return_error_if_cancelled (
      GTask* task
    )

#### Description [src]

Checks if `task`‘s `GCancellable` has been cancelled, and if so, sets `task`‘s error accordingly and completes the task (see `g_task_return_pointer()` for more discussion of exactly what this means).

Available since: 2.36

#### Return value

Type: `gboolean`

`TRUE` if `task` has been cancelled, `FALSE` if not.