Azure / Azure/durabletask

UnobservedTaskException when using task.whenall(durabletask1, durabletask2)

Offen
#47 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @simonporter Auf GitHub ansehen
bug
Vorherrschende Sprache
C#
Sterne
1.7k
Forks
335
Ø Merge
2 T. 23 Std.
Gemergte PRs (30 T.)
6

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.