annotate Implab/IDeferred.cs @ 130:671f60cd0250 v2

fixed Resove method bug when calling it on already cancelled promise
author cin
date Fri, 30 Jan 2015 17:07:17 +0300
parents 2573b562e328
children f75cfa58e3d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
1 using System;
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
2
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
3 namespace Implab {
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
4 /// <summary>
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
5 /// Deferred result, usually used by asynchronous services as the service part of the promise.
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
6 /// </summary>
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
7 public interface IDeferred : ICancellable {
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
8
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
9 void Resolve();
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
10
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
11 void Reject(Exception error);
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
12 }
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
13 }
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents:
diff changeset
14