Thread.h
Thread.cpp
用法:
#include "Thread.h"#include "ThreadPoolExecutor.h"class R : public Runnable{public: ~R() { printf("~R/n"); } void Run() { printf("Hello World/n"); }};int _tmain(int argc, _TCHAR* argv[]){ R r; CThread * t = NULL; t = new CThread(&r); t->Start(); t->Join();
getchar();
}
from:http://blog.csdn.net/huyiyang2010/article/details/5801597