Renames and makes async cancel method.
Renames the `CancelAncestorActivatesAsync` method to `CancelAncestorActivitiesAsync` for clarity and makes it a proper async method, ensuring correct asynchronous execution. This prevents potential issues when cancelling ancestor activities.
This commit is contained in:
parent
59bd21f899
commit
a12a71f367
|
|
@ -43,7 +43,7 @@ public class FlowJoin : Activity, IJoinNode
|
|||
{
|
||||
if (Flowchart.CanWaitAllProceed(context))
|
||||
{
|
||||
Flowchart.CancelAncestorActivatesAsync(context);
|
||||
await Flowchart.CancelAncestorActivitiesAsync(context);
|
||||
await context.CompleteActivityAsync();
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ public class FlowJoin : Activity, IJoinNode
|
|||
}
|
||||
case FlowJoinMode.WaitAny:
|
||||
{
|
||||
Flowchart.CancelAncestorActivatesAsync(context);
|
||||
await Flowchart.CancelAncestorActivitiesAsync(context);
|
||||
await context.CompleteActivityAsync();
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ public class Flowchart : Container
|
|||
return flowScope.AllInboundConnectionsVisited(flowGraph, activity);
|
||||
}
|
||||
|
||||
public static async void CancelAncestorActivatesAsync(ActivityExecutionContext context)
|
||||
public static async Task CancelAncestorActivitiesAsync(ActivityExecutionContext context)
|
||||
{
|
||||
var flowchartContext = context.ParentActivityExecutionContext!;
|
||||
var flowchart = (Flowchart)flowchartContext.Activity;
|
||||
|
|
|
|||
Loading…
Reference in a new issue