barrier_simple

September 14, 2025 ยท View on GitHub

Shows how to use xtd::threading::barrier class.

Sources

  • src/barrier_simple.cpp
  • CMakeLists.txt

Build and run

Open "Command Prompt" or "Terminal". Navigate to the folder that contains the project and type the following:

xtdc run

Output

Thread 9 is performing its work
Thread 11 is performing its work
Thread 8 is performing its work
Thread 11 compelted the phase
Thread 8 compelted the phase
Thread 9 compelted the phase

Contents

  1. 1Sources
  2. 2Build and run
  3. 3Output