Azure / Azure/durabletask

UnobservedTaskException when using task.whenall(durabletask1, durabletask2)

Open
#47 0 comments 0 reactions 1 assignee Claimed by @simonporter View on GitHub
bug
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.