diff --git a/Frame/Examples/Tutorial1/HelloWorld1.cpp b/Frame/Examples/Tutorial1/HelloWorld1.cpp index f87bb1b3..56f3d31e 100644 --- a/Frame/Examples/Tutorial1/HelloWorld1.cpp +++ b/Frame/Examples/Tutorial1/HelloWorld1.cpp @@ -43,9 +43,9 @@ bool HelloWorld1::AfterInit() { std::cout << "Hello, world1, AfterInit" << std::endl; - // test timer - time_id_1 = t->repeat(1000, 10, [](timerid_t id) { std::cout << "T1 ID = " << id << ", interval=1000ms print timer update" << std::endl; }); - time_id_2 = t2->repeat(1500, 10, [](timerid_t id) { std::cout << "T2 ID = " << id << ", interval=1500ms print timer update" << std::endl; }); + //// test timer + //time_id_1 = t->repeat(1000, 10, [](timerid_t id) { std::cout << "T1 ID = " << id << ", interval=1000ms print timer update" << std::endl; }); + //time_id_2 = t2->repeat(1500, 10, [](timerid_t id) { std::cout << "T2 ID = " << id << ", interval=1500ms print timer update" << std::endl; }); ////////////////////////////////////////////////////////////////////////// //test memory alloc @@ -69,8 +69,8 @@ bool HelloWorld1::AfterInit() void HelloWorld1::Update() { - t->update(); - t2->update(); + //t->update(); + //t2->update(); } bool HelloWorld1::BeforeShut() diff --git a/Frame/SDK/PluginLoader/AFPluginLoader.cpp b/Frame/SDK/PluginLoader/AFPluginLoader.cpp index 3b6b11c0..97a306ec 100644 --- a/Frame/SDK/PluginLoader/AFPluginLoader.cpp +++ b/Frame/SDK/PluginLoader/AFPluginLoader.cpp @@ -103,7 +103,6 @@ void CreateBackThread() { gThread = std::thread(std::bind(&ThreadFunc)); std::cout << "CreateBackThread, thread ID = " << gThread.get_id() << std::endl; - gThread.join(); } void InitDaemon() @@ -186,7 +185,7 @@ int main(int argc, char* argv[]) AFCPluginManager::GetInstancePtr()->CheckConfig(); //back thread, for some cmd - //CreateBackThread(); + CreateBackThread(); while(!bExitApp) //DEBUG版本崩溃,RELEASE不崩 { @@ -218,6 +217,8 @@ int main(int argc, char* argv[]) AFCPluginManager::GetInstancePtr()->ReleaseInstance(); + gThread.join(); + return 0; }