C#5.0 in a nutshell P570这本书中的一句话我看不懂,它说:
If s synchronization context is present, oncomplete automatically captures it and posts the continuation to that context. This is very useful in rich client applications, as it bounces the continuation back to the UI thread.
不知道“反弹”是什么意思,oncomplete()里面的东西是不是在主线程里完成的?
请您参考如下方法:
基本上是说 oncomplete 中定义的代码将在基于 ui 的应用程序的主线程上执行。这非常有用,因为您应该只在主线程上修改 UI 组件的状态。例如,在任务完成的某些工作完成后更新标签。
