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

前端 未结 2 2012
旧巷少年郎
旧巷少年郎 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:34

    Yes this should be fine, ContinueWith checks if the previous task completed or not, if so it will immediately queue up the continuation.

提交回复
热议问题