diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 05c90d1..c3966c4 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -123,7 +123,7 @@ namespace fc { bool exists( const path& p ) { return boost::filesystem::exists(p); } void create_directories( const path& p ) { try { - boost::filesystem::create_directories(p); + boost::filesystem::create_directories(p); } catch ( ... ) { FC_THROW_REPORT( "Unable to create directories ${path}", fc::value().set("path", p ).set("inner", fc::except_str() ) ); } diff --git a/src/iostream.cpp b/src/iostream.cpp index bdd2ed1..f108977 100644 --- a/src/iostream.cpp +++ b/src/iostream.cpp @@ -17,6 +17,7 @@ namespace fc { struct cin_buffer { cin_buffer():eof(false),write_pos(0),read_pos(0),cinthread("cin"){ + cinthread.async( [=](){read();} ); } @@ -131,7 +132,6 @@ namespace fc { while( !b.eof && (b.write_pos - b.read_pos)==0 ){ // wait for more... fc::promise::ptr rr( new fc::promise() ); - // b.read_ready = rr; { // copy read_ready because it is accessed from multiple threads fc::scoped_lock lock( b.read_ready_mutex ); b.read_ready = rr; @@ -139,7 +139,7 @@ namespace fc { if( b.write_pos - b.read_pos == 0 ) { rr->wait(); } - b.read_ready.reset(); + // b.read_ready.reset(); { // copy read_ready because it is accessed from multiple threads fc::scoped_lock lock( b.read_ready_mutex ); b.read_ready.reset(); diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 16ac56b..b12310e 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -1,3 +1,3 @@ add_subdirectory( libssh2-1.4.2 ) #add_subdirectory( zlib-1.2.7) -#add_subdirectory( sigar ) +add_subdirectory( sigar )