-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When using this pattern for timeouts, a canceled timer looks like it is still in progress.
var o1task = context.CallSubOrchestratorAsync<o1Response>("o1",
new o1Request();
using (var notificationCts = new CancellationTokenSource())
{
var timeoutTask = context.CreateTimer(context.CurrentUtcDateTime.AddMinutes(2), notificationCts.Token);
var completedTask = await Task.WhenAny(o1task, timeoutTask);
if (completedTask == o1task)
{
notificationCts.Cancel();
}
else
{
var p = await context.CallActivityAsync<string>(nameof(NotifyLongRunningActivity), "");
}
}
var o1 = await o1task;After cancelling the timer, the task remains with the "in progress" symbol and the timeline remains active.

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels