标签:oid class join pre ios col argv iostream 线程
#include "Poco/Thread.h" #include "Poco/RunnableAdapter.h" #include <iostream> class Greeter { public: void greet() { std::cout << "Hello, world!" << std::endl; } }; int main(int argc, char** argv) { Greeter greeter; Poco::RunnableAdapter<Greeter> runnable(greeter, &Greeter::greet); Poco::Thread thread; thread.start(runnable); thread.join();//等待该线程技术 return 0; }
标签:oid class join pre ios col argv iostream 线程
原文地址:https://www.cnblogs.com/yuguangyuan/p/9528691.html