#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; }