Gio.SimpleAsyncResult.new

function new(source_object: GObject.Object, callback: Gio.AsyncReadyCallback, source_tag: void): Gio.SimpleAsyncResult {
    // Gjs wrapper for g_simple_async_result_new()
}
  

Creates a Gio.SimpleAsyncResult.

The common convention is to create the Gio.SimpleAsyncResult in the function that starts the asynchronous operation and use that same function as the source_tag.

If your operation supports cancellation with Gio.Cancellable (which it probably should) then you should provide the user's cancellable to Gio.SimpleAsyncResult.prototype.set_check_cancellable immediately after this function returns.

source_object

a GObject.Object, or null.

callback

a Gio.AsyncReadyCallback.

source_tag

the asynchronous function.

Returns

a Gio.SimpleAsyncResult.