Is it safe to call the ContinueWith method on a TaskCompletionSource.Task (that has had it's .SetResult called)?

前端 未结 2 2014
旧巷少年郎
旧巷少年郎 2021-02-12 15:36

Is it safe to use the ContinueWith(...) method on a TaskCompletionSource.Task if the TaskCompletionSource.SetResult(...) has already been

2条回答
  •  南笙
    南笙 (楼主)
    2021-02-12 16:24

    If the specified task has already completed by the time ContinueWith is called, the synchronous continuation will run on the thread calling ContinueWith. https://msdn.microsoft.com/en-us/library/dd321576(v=vs.110).aspx

提交回复
热议问题