PIThread cxx11 support

git-svn-id: svn://db.shs.com.ru/pip@883 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2020-02-25 15:38:35 +00:00
parent ddd06de776
commit f8f627360a
5 changed files with 65 additions and 12 deletions

View File

@@ -5,11 +5,9 @@ void test() {
}
int main() {
PITimer t([](){piCout << "timer";});
// t.setSlot(test);
t.addDelimiter(5, [](void * d){piCout << "delim 5";});
t.addDelimiter(2, [](){piCout << "delim 2";});
t.start(100);
piMSleep(2000);
PIThread::runOnce([](){ while(1) piCout << "thread1"; });
PIThread::runOnce([](){ while(1) piCout << "thread2"; });
PIThread::runOnce([](){ while(1) piCout << "thread3"; });
piMSleep(1);
return 0;
}