Threads provide a way to run multiple parts of the code in parallel. When you
launch a new thread, the execution is split and both the new thread and the
caller run in parallel.
To use a Thread, you construct it directly with the function to execute
as the entry point of the thread. Thread has multiple template
constructors, which means that you can use several types of entry points:
functions with no arguments
delegates with no arguments
$(PARA
The thread ends when its function is terminated. If the owner $(U Thread)
instance is destroyed before the thread is finished, the destructor will wait
(see `wait()`).)
Threads provide a way to run multiple parts of the code in parallel. When you launch a new thread, the execution is split and both the new thread and the caller run in parallel.
To use a Thread, you construct it directly with the function to execute as the entry point of the thread. Thread has multiple template constructors, which means that you can use several types of entry points:
$(PARA The thread ends when its function is terminated. If the owner $(U Thread) instance is destroyed before the thread is finished, the destructor will wait (see `wait()`).)