### Method

# Gio Task set_name

since: 2.60

#### Declaration [src]

    void
    g_task_set_name (
      GTask* task,
      const gchar* name
    )

#### Description [src]

Sets `task`’s name, used in debugging and profiling. The name defaults to `NULL`.

The task name should describe in a human readable way what the task does. For example, ‘Open file’ or ‘Connect to network host’. It is used to set the name of the `GSource` used for idle completion of the task.

This function may only be called before the `task` is first used in a thread other than the one it was constructed in.

Available since: 2.60

#### Parameters

`name`

  Type: `const gchar*`

  A human readable name for the task, or `NULL` to unset it.

  The argument can be `NULL`.
  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.