### Class

# Ide Task

#### Description

    class Ide.Task : GObject.Object {
      parent_instance: GObject
    }

No description available.

#### Ancestors

- GObject

#### Implements

- GAsyncResult

#### Constructors

###### ide_task_new

Creates a new `IdeTask`.

Available since: 3.32

#### Functions

###### ide_task_report_new_error

No description available.

#### Instance methods

###### ide_task_chain

Causes the result of `self` to also be delivered to `other_task`.

Available since: 3.32

###### ide_task_get_cancellable

Gets the `GCancellable` for the task.

Available since: 3.32

###### ide_task_get_complete_priority

No description available.

###### ide_task_get_completed

Gets the “completed” property. This is `TRUE` after the callback used when creating the task has been executed.

Available since: 3.32

###### ide_task_get_kind

No description available.

###### ide_task_get_name

Gets the name assigned for the task.

Available since: 3.32

###### ide_task_get_priority

No description available.

###### ide_task_get_return_on_cancel

Gets the return_on_cancel value, which means the task will return immediately when the `GCancellable` is cancelled.

Available since: 3.32

###### ide_task_get_source_object

Gets the `GObject` used when creating the source object.

Available since: 3.32

###### ide_task_get_source_tag

No description available.

###### ide_task_get_task_data

Gets the task data previously set with ide_task_set_task_data().

Available since: 3.32

###### ide_task_had_error

Checks to see if the task had an error.

Available since: 3.32

###### ide_task_is_valid

Checks if `source_object` matches the object the task was created with.

Available since: 3.32

###### ide_task_propagate_boolean

No description available.

###### ide_task_propagate_boxed

No description available.

###### ide_task_propagate_int

No description available.

###### ide_task_propagate_object

Returns an object if the task completed with an object. Otherwise, `NULL` is returned.

Available since: 3.32

###### ide_task_propagate_pointer

No description available.

###### ide_task_return_boolean

Sets the result of the task to `result`.

Available since: 3.32

###### ide_task_return_boxed

This is similar to ide_task_return_pointer(), but allows the task to know the boxed `GType` so that the result may be propagated to chained tasks.

Available since: 3.32

###### ide_task_return_error

Sets `error` as the result of the `IdeTask`.

Available since: 3.32

###### ide_task_return_error_if_cancelled

Returns a new `GError` if the cancellable associated with the task has been cancelled. If so, `TRUE` is returned, otherwise `FALSE`.

Available since: 3.32

###### ide_task_return_int

Sets the result of the task to `result`.

Available since: 3.32

###### ide_task_return_new_error

Creates a new `GError` and sets it as the result for the task.

Available since: 3.32

###### ide_task_return_object

Returns a new object instance.

Available since: 3.32

###### ide_task_return_pointer

Returns a new raw pointer.

Available since: 3.32

###### ide_task_run_in_thread

Scheules `thread_func` to be executed on a worker thread.

Available since: 3.32

###### ide_task_set_check_cancellable

Setting `check_cancellable` to `TRUE` (the default) ensures that the `GCancellable` used when creating the `IdeTask` is checked for cancellation before propagating a result. If cancelled, an error will be returned instead of the result.

Available since: 3.32

###### ide_task_set_complete_priority

No description available.

###### ide_task_set_kind

No description available.

###### ide_task_set_name

Sets a useful name for the task.

Available since: 3.32

###### ide_task_set_priority

No description available.

###### ide_task_set_release_on_propagate

Setting this to `TRUE` (the default) ensures that the task will release all task data and source_object references after executing the configured callback. This is useful to ensure that dependent objects are finalized in the thread-default `GMainContext` the task was created in.

Available since: 3.32

###### ide_task_set_return_on_cancel

Setting `return_on_cancel` to `TRUE` ensures that the task will cancel immediately when `GCancellable::cancelled` is emitted by the configured cancellable.

Available since: 3.32

###### ide_task_set_source_tag

Sets the source tag for the task. Generally this is a function pointer of the function that created the task.

Available since: 3.32

###### ide_task_set_task_data

No description available.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GAsyncResult (4)

###### g_async_result_get_source_object

Gets the source object from a `GAsyncResult`.

###### g_async_result_get_user_data

Gets the user data from a `GAsyncResult`.

###### g_async_result_is_tagged

Checks if `res` has the given `source_tag` (generally a function pointer indicating the function `res` was created by).

Available since: 2.34

###### g_async_result_legacy_propagate_error

If `res` is a `GSimpleAsyncResult`, this is equivalent to g_simple_async_result_propagate_error(). Otherwise it returns `FALSE`.

Available since: 2.34

#### Properties

###### Ide.Task:completed

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct IdeTaskClass {
      GObjectClass parent;
      None _reserved;

    }

###### Class members

`parent` |
    GObjectClass
| No description available.
`_reserved` |
    None
| No description available.