summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2011-10-13 10:42:30 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2011-10-13 10:42:30 +0100
commitef1a3a5477706126334aa9bd51b5db2f2d9f7abe (patch)
tree5754f373ccc95470f4efd79a61ef8889b55a3025
parentc58baf42ca38ca1aa059640b2b5348ea816a5d9a (diff)
downloadclutter-ef1a3a5477706126334aa9bd51b5db2f2d9f7abe.tar.gz
docs: Include test-threads.c in the API reference
We can use the test-threads.c interactive test as part of the documentation on how to use threads with Clutter.
-rw-r--r--clutter/clutter-main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index a6e5f4c97..41f939365 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -77,6 +77,16 @@
* g_timeout_add() that acquire the Clutter lock before invoking the provided
* callback: clutter_threads_add_idle() and
* clutter_threads_add_timeout().</para>
+ * <para>The example below shows how to use a worker thread to perform a
+ * blocking operation, and perform UI updates using the main loop.</para>
+ * <example id="worker-thread-example">
+ * <title>A worker thread example</title>
+ * <programlisting>
+ * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../tests/interactive/test-thread.c">
+ * <xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback>
+ * </xi:include>
+ * </programlisting>
+ * </example>
* </refsect2>
*/