tf::Subflow tf::FlowBuilder tf::Runtime taskflow/core/flow_builder.hpp class friend class Executor Executor Executor class friend class FlowBuilder FlowBuilder FlowBuilder class friend class Runtime Runtime Runtime bool bool tf::Subflow::_joinable _joinable {true} void void tf::Subflow::join () join enables the subflow to join its parent task Performs an immediate action to join the subflow. Once the subflow is joined, it is considered finished and you may not modify the subflow anymore. taskflow.emplace([](tf::Subflow&sf){ sf.emplace([](){}); sf.join();//jointhesubflowofonetask }); Only the worker that spawns this subflow can join it. void void tf::Subflow::detach () detach enables the subflow to detach from its parent task Performs an immediate action to detach the subflow. Once the subflow is detached, it is considered finished and you may not modify the subflow anymore. taskflow.emplace([](tf::Subflow&sf){ sf.emplace([](){}); sf.detach(); }); Only the worker that spawns this subflow can detach it. void void tf::Subflow::reset (bool clear_graph=true) reset bool clear_graph true resets the subflow to a joinable state clear_graph specifies whether to clear the associated graph (default true) Clears the underlying task graph depending on the given variable clear_graph (default true) and then updates the subflow to a joinable state. bool bool tf::Subflow::joinable () const noexcept joinable queries if the subflow is joinable This member function queries if the subflow is joinable. When a subflow is joined or detached, it becomes not joinable. taskflow.emplace([](tf::Subflow&sf){ sf.emplace([](){}); std::cout<<sf.joinable()<<'\n';//true sf.join(); std::cout<<sf.joinable()<<'\n';//false }); tf::Subflow::Subflow (Executor &, Worker &, Node *, Graph &) Subflow Executor & executor Worker & worker Node * parent Graph & graph class to construct a subflow graph from the execution of a dynamic task tf::Subflow is a derived class from tf::Runtime with a specialized mechanism to manage the execution of a child graph. By default, a subflow automatically joins its parent node. You may explicitly join or detach a subflow by calling tf::Subflow::join or tf::Subflow::detach, respectively. The following example creates a taskflow graph that spawns a subflow from the execution of task B, and the subflow contains three tasks, B1, B2, and B3, where B3 runs after B1 and B2. //createthreestatictasks tf::TaskA=taskflow.emplace([](){}).name("A"); tf::TaskC=taskflow.emplace([](){}).name("C"); tf::TaskD=taskflow.emplace([](){}).name("D"); //createasubflowgraph(dynamictasking) tf::TaskB=taskflow.emplace([](tf::Subflow&subflow){ tf::TaskB1=subflow.emplace([](){}).name("B1"); tf::TaskB2=subflow.emplace([](){}).name("B2"); tf::TaskB3=subflow.emplace([](){}).name("B3"); B1.precede(B3); B2.precede(B3); }).name("B"); A.precede(B);//BrunsafterA A.precede(C);//CrunsafterA B.precede(D);//DrunsafterB C.precede(D);//DrunsafterC _graph tf::Subflow_graph tf::Subflow_joinable tf::Subflowacquire tf::Subflowacquire tf::Subflowasync tf::Subflowasync tf::Subflowcomposed_of tf::Subflowcorun tf::Subflowcorun_all tf::Subflowcorun_until tf::Subflowdetach tf::Subflowemplace tf::Subflowemplace tf::Subflowemplace tf::Subflowemplace tf::Subflowemplace tf::Subflowerase tf::Subflowexclusive_scan tf::SubflowExecutor tf::Subflowexecutor tf::Subflowfind_if tf::Subflowfind_if_not tf::SubflowFlowBuilder tf::SubflowFlowBuilder tf::Subflowfor_each tf::Subflowfor_each_index tf::Subflowinclusive_scan tf::Subflowinclusive_scan tf::Subflowjoin tf::Subflowjoinable tf::Subflowlinearize tf::Subflowlinearize tf::Subflowmax_element tf::Subflowmin_element tf::Subflowplaceholder tf::Subflowreduce tf::Subflowrelease tf::Subflowrelease tf::Subflowreset tf::SubflowRuntime tf::Subflowschedule tf::Subflowsilent_async tf::Subflowsilent_async tf::Subflowsilent_async_unchecked tf::Subflowsilent_async_unchecked tf::Subflowsort tf::Subflowsort tf::SubflowSubflow tf::Subflowtransform tf::Subflowtransform tf::Subflowtransform_exclusive_scan tf::Subflowtransform_inclusive_scan tf::Subflowtransform_inclusive_scan tf::Subflowtransform_reduce tf::Subflowtransform_reduce tf::Subflowworker tf::Subflow~Runtime