mirror of
https://github.com/boostorg/filesystem.git
synced 2026-02-27 17:02:19 +00:00
Revert mutex locking attempt. VC++ static builds failed in the C runtime because Microsoft staticly initializes some stuff that should be dynamically initialized.
[SVN r83027]
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
// 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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user