.tutorial

git-svn-id: svn://ultimatepp.org/upp/trunk@10554 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-12-19 06:51:33 +00:00
parent 6d6bc38d15
commit df56d7e87d
3 changed files with 28 additions and 2 deletions

View file

@ -40,9 +40,10 @@ file
Algo.cpp,
Function.cpp,
CapturingContainers.cpp,
Thread.cpp,
tutorial2.cpp,
help.qtf;
mainconfig
"" = "GUI";
"" = "GUI MT";

View file

@ -0,0 +1,24 @@
#include "Tutorial.h"
void ThreadTutorial()
{
/// .Thread
Thread t;
t.Run([] {
for(int i = 0; i < 10; i++) {
LOG("In the thread " << i);
Sleep(100);
}
LOG("Thread is ending...");
});
for(int i = 0; i < 5; i++) {
LOG("In the main thread " << i);
Sleep(100);
}
LOG("About to wait for thread to finish");
t.Wait();
LOG("Wait for thread done");
///
}

View file

@ -17,7 +17,6 @@ GUI_APP_MAIN
DO(ContainerClientTypes);
DO(ArrayTutorial);
DO(PolyArray);
DO(Bidirectional);
DO(IndexTutorial);
@ -40,6 +39,8 @@ GUI_APP_MAIN
DO(NullTutorial);
DO(Value2Tutorial);
DO(ValueArrayMap);
DO(ThreadTutorial);
MakeTutorial();
}