c# - With tasks, continueWith and WhenAll(), when continue, when finish task or when finish ConitueWith? -


i have few tasks each 1 has continuewith use result of task. that:

task mytask01 = mymethod01async().continuewith((a) => //do somenthing  a.result);  task mytask02 = mymethod02async().continuewith((a) => //do somenthing a.result);  task.whenall(mytask01, mytask02); 

i know whenall waits until tasks in paramaters done. in case have continuewith, don't know if whenall waits untill continuewith finished or continue when task01 , task02 finish, code continue although continuewith code still running.

continuewith returns new task, using task. whenall, in fact waiting tasks returned continuewith , not mymethod01async , mymethod02async.

so yes, task. whenall wait code inside continuewith finish.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -