+/**
+ * g_io_scheduler_job_send_to_mainloop_async:
+ * @job: a #GIOSchedulerJob
+ * @func: a #GSourceFunc callback that will be called in the original thread
+ * @user_data: data to pass to @func
+ * @notify: (allow-none): a #GDestroyNotify for @user_data, or %NULL
+ *
+ * Used from an I/O job to send a callback to be run asynchronously in
+ * the thread that the job was started from. The callback will be run
+ * when the main loop is available, but at that time the I/O job might
+ * have finished. The return value from the callback is ignored.
+ *
+ * Note that if you are passing the @user_data from g_io_scheduler_push_job()
+ * on to this function you have to ensure that it is not freed before
+ * @func is called, either by passing %NULL as @notify to
+ * g_io_scheduler_push_job() or by using refcounting for @user_data.
+ *
+ * Deprecated: Use g_main_context_invoke().
+ **/
+void
+g_io_scheduler_job_send_to_mainloop_async (GIOSchedulerJob *job,
+ GSourceFunc func,
+ gpointer user_data,
+ GDestroyNotify notify)
+{
+ GSource *source;
+ MainLoopProxy *proxy;
+
+ g_return_if_fail (job != NULL);
+ g_return_if_fail (func != NULL);
+
+ proxy = g_new0 (MainLoopProxy, 1);
+ proxy->func = func;
+ proxy->data = user_data;
+ proxy->notify = notify;
+ g_mutex_init (&proxy->ack_lock);
+ g_cond_init (&proxy->ack_condition);
+
+ source = g_idle_source_new ();
+ g_source_set_priority (source, G_PRIORITY_DEFAULT);
+ g_source_set_callback (source, mainloop_proxy_func, proxy,
+ (GDestroyNotify)mainloop_proxy_free);
+ g_source_set_name (source, "[gio] mainloop_proxy_func");
+
+ g_source_attach (source, job->context);
+ g_source_unref (source);
+}