ultimatepp/autotest/ThreadExitAllocator/ThreadExitAllocator.cpp
cxl 656d32c6ae .autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@15536 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-11-28 16:16:39 +00:00

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();
}