首页 > 未分类 > C++ create_task详解
2019
12-06

C++ create_task详解

IAsyncOperation<T>^ asyncOperation = create_async( []() {
    return create_task(FirstAsync(...))
    .then( [](X val){
        return SecondAsync(val, ...);
    }).then( [](Y val)
        return ThirdAsync(val, ...);
    });

 

这段代码会执行FirstAsync->SecondAsync->ThirdAsync,最后返回的是 ThirdAsync的结果。

 

http://www.cnblogs.com/zjjcy/archive/2012/05/13/2489298.html

最后编辑:
作者:搬运工