Skip to content

How to create a thread ?

Gammasoft edited this page Nov 13, 2023 · 22 revisions

| xtd | News | Gallery | Examples | Downloads | Documentation | Wiki | Support | Sources | Project | Gammasoft |

There are many method to create a simple thread with xtd.

xtd::threading::thread

The usual first method is to create an instance of the xtd::threading::thread class and associate a delegate with it to run in the thread. You can start, join, detach, control the thread priority, get and set properties and manage the created thread.

use delegate begin_invoke and end_invoke methods

Using thread pool

Remarks

You can of course use std::thread or any other third-party thread library.

See