38 typedef long unsigned int t_int;
40 std::vector<t_int> compindices ( boost::num_vertices ( G ) );
41 t_int total_connected = boost::connected_components ( G, &compindices[0] );
43 std::vector<gtool::t_graph> components ( total_connected );
44 std::vector<gtool::t_registry> component_registries ( total_connected );
47 for ( t_int vector_i = 0; vector_i != compindices.size(); ++vector_i )
49 t_int component_j = compindices[vector_i];
53 components[component_j],
56 component_registries[component_j] );
63 typedef std::future<void> t_futuwrite;
64 std::vector<std::future<void>> punits;
66 unsigned long long int c = 0;
68 for (
auto const & g : components )
70 size_t const component_size = g.vertex_set().size();
77 std::string output_file
78 {
this_dest_prefix + std::string (
"_" ) + std::to_string ( ++c ) + std::string (
".dot" ) };
82 punits.push_back ( std::async ( std::launch::async,
graph::write, g, output_file ) );
84 catch ( std::system_error
const & e )
86 if ( e.code() == std::errc::resource_unavailable_try_again )
90 "Could not launch another thread", e.what(),
"for file:", output_file,
91 "try to launch in deferred" );
94 std::async ( std::launch::deferred,
graph::write, g, output_file ) );
97 "File write policy change",
"Program execution correction",
" for file:",
98 output_file,
" launched in deferred" );