diff Implab/IPromise.cs @ 33:b255e4aeef17

removed the reference to the parent from the promise object this allows resolved promises to release parents and results they are holding. Added complete set of operations to IPromiseBase interface Subscribing to the cancellation event of the promise should not affect it's IsExclusive property More tests.
author cin
date Thu, 10 Apr 2014 02:39:29 +0400
parents f0bf98e4d22c
children 790e8a997d30
line wrap: on
line diff
--- a/Implab/IPromise.cs	Tue Apr 08 23:25:01 2014 +0400
+++ b/Implab/IPromise.cs	Thu Apr 10 02:39:29 2014 +0400
@@ -8,14 +8,13 @@
     public interface IPromise<T>: IPromiseBase
     {
 
-        T Join();
-
-        T Join(int timeout);
+        new T Join();
+        new T Join(int timeout);
 
         IPromise<T> Then(ResultHandler<T> success, ErrorHandler error);
         IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error);
         IPromise<T> Then(ResultHandler<T> success);
-        IPromise<T> Error(ErrorHandler error);
+        new IPromise<T> Error(ErrorHandler error);
         IPromise<T> Error(ErrorHandler<T> error);
 
         IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error);
@@ -24,9 +23,9 @@
         IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error);
         IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained);
 
-        IPromise<T> Cancelled(Action handler);
-        IPromise<T> Finally(Action handler);
-        IPromise<T> Anyway(Action handler);
+        new IPromise<T> Cancelled(Action handler);
+        new IPromise<T> Finally(Action handler);
+        new IPromise<T> Anyway(Action handler);
 
     }
 }