ContinueWith
当其他任务有可能永远继续运行时,如何正确使用?
例子:
task
是无限的,但我只想等她特定的时间:
var task = Task.Factory.StartNew(() =>
{
//Small chance for infinite loop
});
task.ContinueWith(t => {
//We would still like to get here after a certion amount of time eventualy.
});