Is there a promise interface for the Task class like jQuery’s deferred’s promise method?
Is there a promise interface for the Task class like jQuery’s deferred’s promise method?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The TPL, and the Task class, are very different than jQuery’s promise.
A
Taskis actually effectively more like the original action. If you wanted to have something run when the task completed, you’d use a continuation on the Task. This would effectively look more like:If you want to continue on multiple tasks, you can use
Task.Factory.ContinueWhenAllorTask.Factory.ContinueWhenAnyto make continuations that works on multiple tasks.