c# - Using tasks when they have all completed -


enter image description herei have question task.factory.continuewhenall method

here code:

private void checknewresult(){     task.factory.continuewhenall(taskslist.toarray(),completetasks); } private void completetasks(tasks[] tasks) {  if(tasks.any(t => t.status == (taskstatus.rantocompletion)))  {     //do  } } 

my question when complete tasks method called? when tasks have finished completing requests?

when doing

 task.factory.continuewhenall(taskslist.toarray(),completetasks); 

documentation states that

creates continuation task started upon completion of set of provided tasks. either in completed state or other.

one possible approach test status of task, , attempt perform continuation if status not faulted or canceled. need this.

 if(tasks.any(t => t.status == (taskstatus.rantocompletion))) 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -