#include <xtd/threading/thread>
#include <xtd/console>
#include <xtd/delegate>
auto main() -> int {
auto d1 =
delegate<int(
string)> {[](
string name) ->
int {
console::write_line(
"(Thread {}) Hello {}!", thread::current_thread().managed_thread_id(), name);
return name == "xtd" ? 42 : 24;
}};
auto result =
d1.begin_invoke(
"Gammasoft");
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
delegate()=default
Initializes an empty delegate.
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.h:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10