implementing future::then() equivalent for asynchronous execution in c++11

前端 未结 3 1531
既然无缘
既然无缘 2020-12-04 17:55

I have a few questions about the implementation of the function then() in Herb Sutter\'s talk. This function is used to chain asynchronous operations, the param

3条回答
  •  我在风中等你
    2020-12-04 18:31

    no, it is not correct. if you pass return value of .get() to continuation, it will not be able to handle exception, propagated from .get(). you have to pass future to continuation, and call .get() manually, just like in boost.thread

提交回复
热议问题