From f97f0f2781fd692cc755fcbd76d3e0ea405bc7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 21 Dec 2022 18:02:07 +0100 Subject: [PATCH] thread: Document the behavior of meta_thread_post_impl_task() Specifically in what contexts things are invoked. Part-of: --- src/backends/native/meta-thread.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/backends/native/meta-thread.c b/src/backends/native/meta-thread.c index 73d5926f8..8168fd4ab 100644 --- a/src/backends/native/meta-thread.c +++ b/src/backends/native/meta-thread.c @@ -1079,6 +1079,24 @@ meta_thread_run_impl_task_sync (MetaThread *thread, g_assert_not_reached (); } +/** + * meta_thread_post_impl_task: + * @thread: A #MetaThread + * @func: The #MetaThreadTaskFunc to invoke in the impl context + * @user_data: An opaque pointer passed to func + * @user_data_destroy: Function called when user_data is no longer needed + * @feedback_func: A #MetaThreadTaskFeedbackFunc to invoke with the result + * @feedback_user_data: An opaque pointer passed to feedback_func + * + * Post tasks to be invoked inside the thread impl context. + * + * The user_data_notify function may be called in any thread, and must be + * thread safe. + * + * The feedback_func will be called on the thread implied by + * feedback_main_contxext. Passing a NULL feedback_main_context implies the + * GLib main thread. + */ void meta_thread_post_impl_task (MetaThread *thread, MetaThreadTaskFunc func,