Files
filesystem/test/locale_multithread_test.cpp
Beman Dawes 5fa8879e0b Current state of development.
[SVN r83033]
2013-02-19 21:08:41 +00:00

36 lines
879 B
C++

// Copyright Jacob Schloss, 2013
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
int main(void)
{
//std::string sPath("c:\\Development");
std::string sPath(".");
boost::thread_group tg;
for(int i = 0; i < 2; i++)
{
tg.create_thread([&sPath](){
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
boost::filesystem::path p(sPath);
boost::filesystem::directory_iterator di(p), end;
while(di != end)
std::cout << (*(di++)).path().string() << std::endl;
});
}
tg.join_all();
int a;
std::cin >> a;
}