[gtkmm-documentation/gtkmm-3-24] Describe how to build a multi-threaded program
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation/gtkmm-3-24] Describe how to build a multi-threaded program
- Date: Mon, 17 Aug 2020 09:18:39 +0000 (UTC)
commit a7427c17caace2d0dcbca93998794a11914ba228
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Mon Aug 17 11:13:43 2020 +0200
Describe how to build a multi-threaded program
Fixes #12
docs/tutorial/C/index-in.docbook | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/docs/tutorial/C/index-in.docbook b/docs/tutorial/C/index-in.docbook
index 81ee0755..a6fa0f94 100644
--- a/docs/tutorial/C/index-in.docbook
+++ b/docs/tutorial/C/index-in.docbook
@@ -7772,6 +7772,14 @@ by a <classname>std::mutex</classname>.
Only the GUI thread updates the GUI.
</para>
+<para>
+Compiling and linking a multi-threaded program can require special compiler and
+linker options. If you use the <application>g++</application> compiler, add the
+<literal>-pthread</literal> option. Other compilers may require other options.
+If you build with <application>meson</application>, it handles the multi-threading
+complications for you, if you add <function>dependency('threads')</function>.
+</para>
+
<figure id="figure-multithread">
<title>Multi-Threaded Program</title>
<screenshot>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]