Shows how to use xtd::threading::jthread class.
#include <xtd/threading/jthread>
#include <xtd/block_scope>
#include <xtd/console>
auto main() -> int {
auto thread_proc = [] {
};
}
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
static jthread start_new(const xtd::threading::thread_start &start)
Create and immedialtely start a xtd::threading::jthread with specified method.
static thread & current_thread() noexcept
Gets the currently running thread.
static void sleep(int32 milliseconds_timeout)
Suspends the current thread for a specified time.
#define block_scope_(...)
The specified expression is cleared automatically when the scope is ended.
Definition block_scope.hpp:25
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8