CoreTaskExtensionsFinally Method (Task, ActionTask) |
Namespace: Rackspace.Threading
Exception | Condition |
---|---|
ArgumentNullException |
If task is . -or- If cleanupAction is . |
This code implements support for the following construct without requiring the use of /.
try { await task.ConfigureAwait(false); } finally { cleanupAction(task); }
This method ensures that exception information provided by a faulted or canceled task is not wrapped in an additional AggregateException.
Notes to Callers |
---|
Since the continuation is executed synchronously, this method should only be used for lightweight continuation functions. For non-trivial continuation functions, use a Task for the continuation operation and call Finally(Task, FuncTask, Task) instead. |