run_in_thread


Description:

[ Version ( since = "2.36" ) ]
public void run_in_thread (TaskThreadFunc task_func)

Runs task_func in another thread.

When task_func returns, this's TaskReadyCallback will be invoked in this's MainContext.

This takes a ref on this until the task completes.

See TaskThreadFunc for more details about how task_func is handled.

Although GLib currently rate-limits the tasks queued via run_in_thread, you should not assume that it will always do this. If you have a very large number of tasks to run, but don't want them to all run at once, you should only queue a limited number of them at a time.

Parameters:

this

a Task

task_func

a TaskThreadFunc