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

posted on 2016-03-04 17:32  jiahuafu  阅读(2970)  评论(0编辑  收藏  举报

导航