diff --git a/GFramework.Game/Scene/SceneTransitionPipeline.cs b/GFramework.Game/Scene/SceneTransitionPipeline.cs index a8e93e82..2a2f0afd 100644 --- a/GFramework.Game/Scene/SceneTransitionPipeline.cs +++ b/GFramework.Game/Scene/SceneTransitionPipeline.cs @@ -148,7 +148,7 @@ public class SceneTransitionPipeline foreach (var handler in sortedHandlers) { var options = _options[handler]; - await ExecuteSingleHandlerAsync(handler, options, @event, cancellationToken); + await ExecuteSingleHandlerAsync(handler, options, @event, cancellationToken).ConfigureAwait(false); } Log.Debug("Pipeline execution completed for phases: {0}", phases); @@ -173,7 +173,7 @@ public class SceneTransitionPipeline if (handlers.Count == 0) { - await coreAction(); + await coreAction().ConfigureAwait(false); return; } @@ -191,11 +191,11 @@ public class SceneTransitionPipeline var options = _aroundOptions[handler]; var next = pipeline; - pipeline = async () => await ExecuteSingleAroundHandlerAsync( - handler, options, @event, next, cancellationToken); + pipeline = () => ExecuteSingleAroundHandlerAsync( + handler, options, @event, next, cancellationToken); } - await pipeline(); + await pipeline().ConfigureAwait(false); } private List FilterAndSortHandlers( @@ -283,7 +283,7 @@ public class SceneTransitionPipeline ? CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token) : null; - await handler.HandleAsync(@event, next, linkedCts?.Token ?? cancellationToken); + await handler.HandleAsync(@event, next, linkedCts?.Token ?? cancellationToken).ConfigureAwait(false); Log.Debug("Around handler completed: {0}", handler.GetType().Name); } @@ -296,4 +296,4 @@ public class SceneTransitionPipeline throw; } } -} \ No newline at end of file +} diff --git a/GFramework.Game/UI/UiTransitionPipeline.cs b/GFramework.Game/UI/UiTransitionPipeline.cs index 4ca005cf..49101d2f 100644 --- a/GFramework.Game/UI/UiTransitionPipeline.cs +++ b/GFramework.Game/UI/UiTransitionPipeline.cs @@ -133,7 +133,7 @@ public class UiTransitionPipeline foreach (var handler in sortedHandlers) { var options = _options[handler]; - await ExecuteSingleHandlerAsync(handler, options, @event, cancellationToken); + await ExecuteSingleHandlerAsync(handler, options, @event, cancellationToken).ConfigureAwait(false); } Log.Debug("Pipeline execution completed for phases: {0}", phases); @@ -158,7 +158,7 @@ public class UiTransitionPipeline if (handlers.Count == 0) { - await coreAction(); + await coreAction().ConfigureAwait(false); return; } @@ -176,11 +176,11 @@ public class UiTransitionPipeline var options = _aroundOptions[handler]; var next = pipeline; - pipeline = async () => await ExecuteSingleAroundHandlerAsync( + pipeline = () => ExecuteSingleAroundHandlerAsync( handler, options, @event, next, cancellationToken); } - await pipeline(); + await pipeline().ConfigureAwait(false); } private List FilterAndSortHandlers( @@ -268,7 +268,7 @@ public class UiTransitionPipeline ? CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, timeoutCts.Token) : null; - await handler.HandleAsync(@event, next, linkedCts?.Token ?? cancellationToken); + await handler.HandleAsync(@event, next, linkedCts?.Token ?? cancellationToken).ConfigureAwait(false); Log.Debug("Around handler completed: {0}", handler.GetType().Name); } @@ -281,4 +281,4 @@ public class UiTransitionPipeline throw; } } -} \ No newline at end of file +}