Debian Codegraph @

subprojects/meson-docs/docs/markdown/Threads.md

raw
1 ---
2 short-description: Enabling thread support
3 ...
4
5 # Threads
6
7 Meson has a very simple notational shorthand for enabling thread
8 support on your build targets. First you obtain the thread dependency
9 object like this:
10
11 ```meson
12 thread_dep = dependency('threads')
13 ```
14
15 And then you just use it in a target like this:
16
17 ```meson
18 executable('threadedprogram', ...
19 dependencies : thread_dep)
20 ```