Shows how to use xtd::threading::tasks:task::delay method.
#include <xtd/xtd>
class example {
public:
static auto main() async_ {
task<>::delay(time_span::from_seconds(1.5)).wait();
return 42;
});
co_await t;
console::write_line("Task t status: {}, result: {}", t.status(), t.result());
}
};
#define delegate_
The declaration of a delegate type is similar to a method signature. It has a return value and any nu...
Definition delegate.hpp:1018
#define startup_(...)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:278