annotate Implab/IPromiseT.cs @ 121:62d2f1e98c4e v2

working version of AsyncQueue and batch operations tests
author cin
date Mon, 12 Jan 2015 18:19:41 +0300
parents 2573b562e328
children f75cfa58e3d4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
66
790e8a997d30 Refactoring
cin
parents:
diff changeset
1 using System;
790e8a997d30 Refactoring
cin
parents:
diff changeset
2
75
4439140706d0 major refactoring, added tasks support
cin
parents: 72
diff changeset
3 namespace Implab {
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
4 public interface IPromise<out T> : IPromise {
66
790e8a997d30 Refactoring
cin
parents:
diff changeset
5
790e8a997d30 Refactoring
cin
parents:
diff changeset
6 new T Join();
75
4439140706d0 major refactoring, added tasks support
cin
parents: 72
diff changeset
7
66
790e8a997d30 Refactoring
cin
parents:
diff changeset
8 new T Join(int timeout);
790e8a997d30 Refactoring
cin
parents:
diff changeset
9
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
10 IPromise<T> On(Action<T> success, Action<Exception> error, Action cancel);
76
c761fc982e1d Refactoring of the IPromise<T> interface
cin
parents: 75
diff changeset
11
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
12 IPromise<T> On(Action<T> success, Action<Exception> error);
76
c761fc982e1d Refactoring of the IPromise<T> interface
cin
parents: 75
diff changeset
13
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
14 IPromise<T> On(Action<T> success);
76
c761fc982e1d Refactoring of the IPromise<T> interface
cin
parents: 75
diff changeset
15
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
16 new IPromise<T> On(Action handler, PromiseEventType events);
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
17
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
18 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error, Func<T2> cancel);
76
c761fc982e1d Refactoring of the IPromise<T> interface
cin
parents: 75
diff changeset
19
101
279e226dffdd code cleanup
cin
parents: 94
diff changeset
20 IPromise<T2> Then<T2>(Func<T, T2> mapper, Func<Exception,T2> error);
76
c761fc982e1d Refactoring of the IPromise<T> interface
cin
parents: 75
diff changeset
21
101
279e226dffdd code cleanup
cin
parents: 94
diff changeset
22 IPromise<T2> Then<T2>(Func<T, T2> mapper);
76
c761fc982e1d Refactoring of the IPromise<T> interface
cin
parents: 75
diff changeset
23
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
24 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error, Func<IPromise<T2>> cancel);
76
c761fc982e1d Refactoring of the IPromise<T> interface
cin
parents: 75
diff changeset
25
101
279e226dffdd code cleanup
cin
parents: 94
diff changeset
26 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained, Func<Exception,IPromise<T2>> error);
76
c761fc982e1d Refactoring of the IPromise<T> interface
cin
parents: 75
diff changeset
27
101
279e226dffdd code cleanup
cin
parents: 94
diff changeset
28 IPromise<T2> Chain<T2>(Func<T, IPromise<T2>> chained);
75
4439140706d0 major refactoring, added tasks support
cin
parents: 72
diff changeset
29
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
30 IPromise<T2> Error<T2>(Func<Exception,T2> error);
66
790e8a997d30 Refactoring
cin
parents:
diff changeset
31
119
2573b562e328 Promises rewritten, added improved version of AsyncQueue
cin
parents: 106
diff changeset
32 IPromise<T2> Cancelled<T2>(Func<T2> handler);
66
790e8a997d30 Refactoring
cin
parents:
diff changeset
33 }
790e8a997d30 Refactoring
cin
parents:
diff changeset
34 }