Concatenate tasks

Apr 15, 2015 at 11:51 PM
I have two functions returning a task and the output of the first need to feed the input of the subsequent. How do I concatenate them? I am using pplx.

Apr 16, 2015 at 2:21 AM
Hi Pedro,

Perhaps I'm not following but can you not just hook up a continuation to the first task? Then when the first task completed the second one can run taking in its input. Something like the following:
    auto task1 = pplx::create_task([] { return 44; });
    auto task2 = task1.then([](pplx::task<int> t1)
        int t1Result = t1.get();
        // Function2 work...

    // wait for task2, and transitively task1, to complete