Gio.Task.prototype.set_priority

function set_priority(priority: Number(gint)): void {
    // Gjs wrapper for g_task_set_priority()
}
  

Sets task's priority. If you do not call this, it will default to %G_PRIORITY_DEFAULT.

This will affect the priority of #GSources created with Gio.Task.attach_source and the scheduling of tasks run in threads, and can also be explicitly retrieved later via Gio.Task.prototype.get_priority.

Since 2.36

priority

the [priority][io-priority] of the request