#include <xtd/threading/thread>
#include <xtd/console>
#include <xtd/startup>
#include <thread>
namespace mixing_std_and_xtd_threads_example {
class mixing_std_and_xtd_threads_class {
private:
}
public:
static auto main() {
}};
t1.start();
std::thread t2 {[] {
}};
}};
t3.is_background(true);
t3.start();
std::thread t4 {[] {
}};
if (t1.joinable()) t1.join();
if (t2.joinable()) t2.join();
if (t3.joinable()) t3.join();
if (t4.joinable()) t4.join();
}
};
}
startup_(mixing_std_and_xtd_threads_example::mixing_std_and_xtd_threads_class::main);
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
Creates and controls a thread, sets its priority, and gets its status.
Definition thread.hpp:45
xtd::threading::thread_priority priority() const noexcept
Gets a value indicating the scheduling priority of a thread.
intptr thread_id() const noexcept
Gets the native operating system thread id.
static thread & current_thread() noexcept
Gets the currently running thread.
static void sleep(int32 milliseconds_timeout)
Suspends the current thread for a specified time.
string name() const noexcept
Gets the name of the thread.
int32 managed_thread_id() const noexcept
Gets a unique identifier for the current managed thread.
xtd::threading::thread_state thread_state() const noexcept
Gets a value containing the states of the current thread.
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:168
@ below_normal
The system::threading::thread can be scheduled after threads with thread_priority::normal priority an...
Definition thread_priority.hpp:28
@ highest
The system::threading::thread can be scheduled before threads with any other priority.
Definition thread_priority.hpp:34
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
string to_string() const noexcept override
Returns the string representation of this xtd::read_only_span <type_t> object.
Definition read_only_span.hpp:375