【標準C++】C++相談室 part39【STL含む】
■ このスレッドは過去ログ倉庫に格納されています
0376デフォルトの名無しさん
05/02/02 14:23:48#include <boost/thread.hpp>
void f()
{ for (;;) std::cout << "ぬるぽ" << std::endl; }
void g()
{ for (;;) std::cout << "ガッ" << std::endl; }
int main()
{
boost::thread th1(&f);
boost::thread th2(&g);
th1.join();
th2.join();
return 0;
}
VC7.1
結果:激しくsynchronized
■ このスレッドは過去ログ倉庫に格納されています