delegatebegininvoke2

September 14, 2025 ยท View on GitHub

Shows how to use xtd::delegate::begin_invoke, xtd::delegate::end_invoke and xtd::delegate::invoke methods.

Sources

  • src/delegate_begin_invoke2.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

(main) thread id = 1
(invoker) thread id = 1, value = 42
(invoker) thread id = 2, value = 24

Contents

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