mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-13 06:13:00 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@15536 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
125cdc9e15
commit
656d32c6ae
2 changed files with 28 additions and 0 deletions
19
autotest/ThreadExitAllocator/ThreadExitAllocator.cpp
Normal file
19
autotest/ThreadExitAllocator/ThreadExitAllocator.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#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();
|
||||
}
|
||||
9
autotest/ThreadExitAllocator/ThreadExitAllocator.upp
Normal file
9
autotest/ThreadExitAllocator/ThreadExitAllocator.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
ThreadExitAllocator.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue