UnobservedTaskException when using task.whenall(durabletask1, durabletask2)
- Lingua principale
- C#
- Stelle
- 1.7k
- Fork
- 335
- Merge medio
- 2g 23h
- PR unite (30g)
- 6
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.