From bfcd18aabb34f044bc753bf594408c5f40143f66 Mon Sep 17 00:00:00 2001 From: neuecc Date: Fri, 29 May 2020 14:35:50 +0900 Subject: [PATCH] MoveNextRunner -> StateMachineRunner --- .../CompilerServices/AsyncUniTaskMethodBuilder.cs | 4 ++-- .../AsyncUniTaskVoidMethodBuilder.cs | 2 +- .../{MoveNextRunner.cs => StateMachineRunner.cs} | 12 ++++++------ ...NextRunner.cs.meta => StateMachineRunner.cs.meta} | 0 4 files changed, 9 insertions(+), 9 deletions(-) rename src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/{MoveNextRunner.cs => StateMachineRunner.cs} (92%) rename src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/{MoveNextRunner.cs.meta => StateMachineRunner.cs.meta} (100%) diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs index 5f7b297..7aaafee 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskMethodBuilder.cs @@ -12,7 +12,7 @@ namespace Cysharp.Threading.Tasks.CompilerServices [StructLayout(LayoutKind.Auto)] public struct AsyncUniTaskMethodBuilder { - internal IMoveNextRunnerPromise runnerPromise; + internal IStateMachineRunnerPromise runnerPromise; Exception ex; // 1. Static Create method. @@ -133,7 +133,7 @@ namespace Cysharp.Threading.Tasks.CompilerServices [StructLayout(LayoutKind.Auto)] public struct AsyncUniTaskMethodBuilder { - internal IMoveNextRunnerPromise runnerPromise; + internal IStateMachineRunnerPromise runnerPromise; Exception ex; T result; diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs index 0e469d2..3736e78 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/AsyncUniTaskVoidMethodBuilder.cs @@ -12,7 +12,7 @@ namespace Cysharp.Threading.Tasks.CompilerServices [StructLayout(LayoutKind.Auto)] public struct AsyncUniTaskVoidMethodBuilder { - internal IMoveNextRunner runner; + internal IStateMachineRunner runner; // 1. Static Create method. [DebuggerHidden] diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/MoveNextRunner.cs b/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs similarity index 92% rename from src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/MoveNextRunner.cs rename to src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs index e33febd..7cbc5ab 100644 --- a/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/MoveNextRunner.cs +++ b/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs @@ -7,13 +7,13 @@ using System.Runtime.CompilerServices; namespace Cysharp.Threading.Tasks.CompilerServices { - public interface IMoveNextRunner + internal interface IStateMachineRunner { Action MoveNext { get; } void Return(); } - internal interface IMoveNextRunnerPromise : IUniTaskSource + internal interface IStateMachineRunnerPromise : IUniTaskSource { Action MoveNext { get; } UniTask Task { get; } @@ -21,7 +21,7 @@ namespace Cysharp.Threading.Tasks.CompilerServices void SetException(Exception exception); } - internal interface IMoveNextRunnerPromise : IUniTaskSource + internal interface IStateMachineRunnerPromise : IUniTaskSource { Action MoveNext { get; } UniTask Task { get; } @@ -29,7 +29,7 @@ namespace Cysharp.Threading.Tasks.CompilerServices void SetException(Exception exception); } - internal sealed class AsyncUniTaskVoid : IMoveNextRunner, ITaskPoolNode>, IUniTaskSource + internal sealed class AsyncUniTaskVoid : IStateMachineRunner, ITaskPoolNode>, IUniTaskSource where TStateMachine : IAsyncStateMachine { static TaskPool> pool; @@ -97,7 +97,7 @@ namespace Cysharp.Threading.Tasks.CompilerServices } } - internal sealed class AsyncUniTask : IMoveNextRunnerPromise, IUniTaskSource, ITaskPoolNode> + internal sealed class AsyncUniTask : IStateMachineRunnerPromise, IUniTaskSource, ITaskPoolNode> where TStateMachine : IAsyncStateMachine { static TaskPool> pool; @@ -208,7 +208,7 @@ namespace Cysharp.Threading.Tasks.CompilerServices } } - internal sealed class AsyncUniTask : IMoveNextRunnerPromise, IUniTaskSource, ITaskPoolNode> + internal sealed class AsyncUniTask : IStateMachineRunnerPromise, IUniTaskSource, ITaskPoolNode> where TStateMachine : IAsyncStateMachine { static TaskPool> pool; diff --git a/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/MoveNextRunner.cs.meta b/src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs.meta similarity index 100% rename from src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/MoveNextRunner.cs.meta rename to src/UniTask/Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs.meta