Possible error in usage of cancellationToken parameter to context.CreateTimer in AzureStorageScenarioTests.cs? #1178
Open
Description
Referring to
Task timeoutTask = context.CreateTimer(deadline, cts.Token);
The second parameter of context.CreateTimer
, that should be the state
, not the cancellationToken, am I right? I'm trying to understand how to use this in my own projects, and looking at the source code to understand.
In this particular scenario, the state returned from the CreateTimer is not used, so it might not be easy to spot, but shouldn't the line be:
object dummyState = new object() // whatever, the result is not used in this example
Task timeoutTask = context.CreateTimer(deadline, dummyState, cts.Token);
where dummyState
is the state? If not, the timer will never be cancelled, even when the approval task completes, and the orchestration instance will never finish?
Or have I misunderstood how this works?
Metadata
Assignees
Labels
No labels
Activity