diff --git a/autotest/ThreadExitAllocator/ThreadExitAllocator.cpp b/autotest/ThreadExitAllocator/ThreadExitAllocator.cpp new file mode 100644 index 000000000..b6a58b9d8 --- /dev/null +++ b/autotest/ThreadExitAllocator/ThreadExitAllocator.cpp @@ -0,0 +1,19 @@ +#include + +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(); +} diff --git a/autotest/ThreadExitAllocator/ThreadExitAllocator.upp b/autotest/ThreadExitAllocator/ThreadExitAllocator.upp new file mode 100644 index 000000000..885e84d64 --- /dev/null +++ b/autotest/ThreadExitAllocator/ThreadExitAllocator.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + ThreadExitAllocator.cpp; + +mainconfig + "" = ""; +