Mercurial > pub > ImplabNet
diff Implab/SyncContextPromise.cs @ 138:f75cfa58e3d4 v2
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
author | cin |
---|---|
date | Tue, 17 Feb 2015 18:16:26 +0300 |
parents | 2573b562e328 |
children | 706fccb85524 |
line wrap: on
line diff
--- a/Implab/SyncContextPromise.cs Mon Feb 16 17:48:39 2015 +0300 +++ b/Implab/SyncContextPromise.cs Tue Feb 17 18:16:26 2015 +0300 @@ -1,4 +1,5 @@ using System.Threading; +using System; namespace Implab { public class SyncContextPromise<T> : Promise<T> { @@ -13,12 +14,12 @@ m_context.Post(x => base.SignalSuccess(handler), null); } - protected override void SignalError(IDeferred<T> handler, System.Exception error) { + protected override void SignalError(IDeferred<T> handler, Exception error) { m_context.Post(x => base.SignalError(handler, error), null); } - protected override void SignalCancelled(IDeferred<T> handler) { - m_context.Post(x => base.SignalCancelled(handler), null); + protected override void SignalCancelled(IDeferred<T> handler, Exception reason) { + m_context.Post(x => base.SignalCancelled(handler, reason), null); } } }