diff Implab/IPromise.cs @ 10:aa33d0bb8c0c promises

implemeted new cancellable promises concept
author cin
date Sun, 03 Nov 2013 18:07:38 +0400
parents c82e0dfbb4dd
children 6ec82bf68c8e
line wrap: on
line diff
--- a/Implab/IPromise.cs	Sat Nov 02 00:55:47 2013 +0400
+++ b/Implab/IPromise.cs	Sun Nov 03 18:07:38 2013 +0400
@@ -29,5 +29,12 @@
         /// <param name="dependencies">Try to cancel the whole promise chain, the parent promise will be cancelled only if it has only one promise</param>
         /// <returns></returns>
         bool Cancel(bool dependencies);
+
+        /// <summary>
+        /// Registers handler for the case when the promise is cencelled. If the promise already cancelled the
+        /// handler will be invoked immediatelly.
+        /// </summary>
+        /// <param name="handler">The handler</param>
+        void HandleCancelled(Action handler);
     }
 }