mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-13 14:22:33 -06:00
19 lines
349 B
C++
19 lines
349 B
C++
#include <Core/Core.h>
|
|
|
|
using namespace Upp;
|
|
|
|
struct Foo {
|
|
const char *text;
|
|
Foo(const char *text) : text(text) { LOG("Foo: " << text); }
|
|
~Foo() { LOG("~Foo: " << text); }
|
|
};
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
Thread t;
|
|
t.Run([] {
|
|
thread_local Foo foo("local in Thread");
|
|
LOG("In the thread");
|
|
});
|
|
t.Wait();
|
|
}
|