[glib/wip/ernestask/bz-693576-annotations] task: Add scope annotation to run_in_thread{, _sync}()



commit 741fd521f1fcdf1b21c6cc5c18d4f6d2b0e2625e
Author: Garrett Regier <garrettregier gmail com>
Date:   Thu Oct 20 00:14:33 2016 -0700

    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.
    
    Fixes https://gitlab.gnome.org/GNOME/glib/issues/668

 gio/gtask.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gtask.c b/gio/gtask.c
index 9950bb36b..06f63e7b1 100644
--- a/gio/gtask.c
+++ b/gio/gtask.c
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]