UnobservedTaskException when using task.whenall(durabletask1, durabletask2)
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 6
Description
The following usage (and other similar usages):
UnobservedTaskException when using task.whenall(durabletask1, durabletask2)
..can result in an unobservedtaskexception when durabletask1 is completed but durabletask2 is not.
Reason is that since durabletask2 is not completed, the exception property on durabletask1 is not actually looked at. Now the way the dtfx taskorchestrationdispatcher works is by dropping all the outstanding tasks without disposing them. This will cause the durabletask1's finalizer to run which will throw an unobservedtaskexception.
The fix is to observe the exception property for all tasks before they are pushed out of scope.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.