| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/ModuleWorks/taskflow/task_isolation/examples/attach_data.cpp | [Back] [Original] |
// This example demonstrates how to attach data to a task and run
// the task iteratively with changing data.
#include
int main(){
tf::Executor executor;
tf::Taskflow taskflow("attach data to a task");
int data;
// create a task and attach it the data
auto A = taskflow.placeholder();
A.data(&data).work([A](){
auto d = *static_cast(A.data());
std::cout
| Web Proxy Viewer | New URL | Original Page |