C++ create_task详解

IAsyncOperation^ 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

你可能感兴趣的:(C++ create_task详解)