Ejemplo n.º 1
0
        public IntAwaitable Wait(int milliseconds)
        {
            var awaiter = new CustomIntAwaiter();

            Task.Run(() =>
            {
                Thread.Sleep(milliseconds);
                awaiter.SetCompleted();
            });

            return new IntAwaitable(awaiter);
        }
Ejemplo n.º 2
0
 private IntAwaitable(CustomIntAwaiter awaiter)
 {
     _awaiter = awaiter;
 }