task_func in another thread. When
GAsyncReadyCallback will be invoked in
This takes a ref on
task until the task completes.
GTaskThreadFunc for more details about how
task_func is handled.
Although GLib currently rate-limits the tasks queued via g_task_run_in_thread(), you should not assume that it will always do this. If you have a very large number of tasks to run (several tens of tasks), but don’t want them to all run at once, you should only queue a limited number of them (around ten) at a time.
Available since: 2.36