IAwaiter.cs 332 B

1234567891011121314
  1. using System.Runtime.CompilerServices;
  2. namespace XGame.Framework.Asyncs
  3. {
  4. /// <summary>
  5. /// 供C# await语法
  6. /// awaiter状态应该与所属的IAsync保持一致
  7. /// </summary>
  8. public interface IAwaiter : INotifyCompletion
  9. {
  10. bool IsCompleted { get; }
  11. void Completed(IAsync result);
  12. }
  13. }