jthread

September 14, 2025 ยท View on GitHub

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

Sources

Build and run

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

xtdc run

Output

(main) begin
  (thread_proc) index = 0
  (thread_proc) index = 1
  (thread_proc) index = 2
  (thread_proc) index = 3
  (thread_proc) index = 4
  (thread_proc) index = 5
  (thread_proc) index = 6
  (thread_proc) index = 7
  (thread_proc) index = 8
  (thread_proc) index = 9
(main) end