Praveen,
> I have doubt regarding task creation when creating nested futures like
Sorry, I'm not sure what you're asking about.
> 1. future.then(another_task.then(another_task.then(...)))
This will not work. Future::then() returns another future which represents the
result of the execution of the attached continuation.
future<T1> f1 = ...
future<T2> f2 = f1.then([](future<T1> f) -> T2 { f.get(); return T2{}; } );
which allows to chain things:
future<T2> f3 = f2.then([](future<T2> f) -> T3 { f.get(); return T3{}; } );
...
> 2. futures inside the loop based on previous iteration (eg future[i] =
> future[i-1].then(something))
This is just a variation to what I showed above.
> Does this have different task-creation techniques? I found it in one of
> the tutorials videos by john biddiscombe and thomas heller.
> Could anyone please explain me?
HTH
Regards Hartmut
---------------
http://boost-spirit.com
http://stellar.cct.lsu.edu
_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users