GitHub Viewer
// The program demonstrates how to cancel a submitted taskflow
// graph and wait until the cancellation completes.
#include
int main() {
tf::Executor executor;
tf::Taskflow taskflow("cancel");
// We create a taskflow graph of 1000 tasks each of 1 second.
// Ideally, the taskflow completes in 1000/P seconds, where P
// is the number of workers.
for(int i=0; i