Azure / Azure/durabletask

UnobservedTaskException when using task.whenall(durabletask1, durabletask2)

Aperta
#47 0 commenti 0 reazioni 1 assegnatario Rivendicata da @simonporter Vedi su GitHub
bug
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.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.