task: Add scope annotation to run_in_thread{,_sync}()

Without specifying the scope, the two functions are non-introspectable
and GTask cannot be used meaningfully by bindings.

Related: https://gitlab.gnome.org/GNOME/glib/issues/668
This commit is contained in:
Garrett Regier 2016-10-20 00:14:33 -07:00 committed by Ernestas Kulik
parent 963786f608
commit 42369df7c6

View File

@ -1497,7 +1497,7 @@ g_task_start_task_thread (GTask *task,
/**
* g_task_run_in_thread:
* @task: a #GTask
* @task_func: a #GTaskThreadFunc
* @task_func: (scope async): a #GTaskThreadFunc
*
* Runs @task_func in another thread. When @task_func returns, @task's
* #GAsyncReadyCallback will be invoked in @task's #GMainContext.
@ -1540,7 +1540,7 @@ g_task_run_in_thread (GTask *task,
/**
* g_task_run_in_thread_sync:
* @task: a #GTask
* @task_func: a #GTaskThreadFunc
* @task_func: (scope async): a #GTaskThreadFunc
*
* Runs @task_func in another thread, and waits for it to return or be
* cancelled. You can use g_task_propagate_pointer(), etc, afterward