res:http://www.cnblogs.com/TianFang/archive/2006/12/05/583231.html
#include "ace/Task.h"
#include "ace/OS.h"
#include <iostream>
using namespace std;
class TaskThread: public ACE_Task<ACE_MT_SYNCH>
{
public:
virtual int svc(void)
{
for(int i=0;i<10;i++)
{
ACE_OS::sleep(1);
cout<<endl<<"hello thread1"<<endl;
}
return 0;
}
};
int main(int argc, char *argv[])
{
TaskThread task;
task.activate();
while(true)
ACE_OS::sleep(10);
return 0;
}