// Consolehello.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <thread>
#include <iostream>
#include <boost\smart_ptr\shared_ptr.hpp>
void hello()
{
std::cout<<"hello"<<std::endl;
}
int _tmain(int argc, _TCHAR* argv[])
{
for(int k = 0 ; k < 10 ; k++)
{
std::auto_ptr<std::thread> test(new std::thread(hello));
boost::shared_ptr<std::thread> te(new std::thread(hello));
test->join();
te->join();
}
return 0;
}
//
#include "stdafx.h"
#include <thread>
#include <iostream>
#include <boost\smart_ptr\shared_ptr.hpp>
void hello()
{
std::cout<<"hello"<<std::endl;
}
int _tmain(int argc, _TCHAR* argv[])
{
for(int k = 0 ; k < 10 ; k++)
{
std::auto_ptr<std::thread> test(new std::thread(hello));
boost::shared_ptr<std::thread> te(new std::thread(hello));
test->join();
te->join();
}
return 0;
}