Method

GioSimpleAsyncResultrun_in_thread

Declaration

void
g_simple_async_result_run_in_thread (
  GSimpleAsyncResult* simple,
  GSimpleAsyncThreadFunc func,
  int io_priority,
  GCancellable* cancellable
)

Description

Runs the asynchronous job in a separate thread and then calls g_simple_async_result_complete_in_idle() on simple to return the result to the appropriate main loop.

Calling this function takes a reference to simple for as long as is needed to run the job and report its completion.

Deprecated since:2.46

Use GTask and g_task_run_in_thread() instead.

This method is not directly available to language bindings.

Parameters

func

Type: GSimpleAsyncThreadFunc

A GSimpleAsyncThreadFunc.

io_priority

Type: int

The io priority of the request.

cancellable

Type: GCancellable

Optional GCancellable object, NULL to ignore.

The argument can be NULL.
The data is owned by the caller of the function.