示例#1
0
 public Action GetContinuation <TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine
 {
     if (_continuer is null)
     {
         _continuer = Internal.PromiseMethodContinuer.GetOrCreate(ref stateMachine, this);
     }
     return(_continuer.Continuation);
 }
示例#2
0
 protected override void Dispose()
 {
     base.Dispose();
     if (_continuer != null)
     {
         _continuer.Dispose();
         _continuer = null;
     }
     if (Config.ObjectPooling != PoolType.None)
     {
         _pool.Push(this);
     }
 }