# HG changeset patch # User cin # Date 1393822743 -14400 # Node ID a236cd1f0477e03ce451cf30effce5114cfb5783 # Parent f0bf98e4d22c0f12bc09f61916c681801ca9e85e fixes diff -r f0bf98e4d22c -r a236cd1f0477 Implab.v11.suo Binary file Implab.v11.suo has changed diff -r f0bf98e4d22c -r a236cd1f0477 Implab/Promise.cs --- a/Implab/Promise.cs Fri Feb 21 03:15:28 2014 +0400 +++ b/Implab/Promise.cs Mon Mar 03 08:59:03 2014 +0400 @@ -316,7 +316,7 @@ var medium = new Promise(this, true); AddHandler( - null, + x => medium.Resolve(x), e => { try { medium.Resolve(handler(e)); @@ -541,12 +541,12 @@ // if the promise have been resolved while we was adding handler to the queue // we can't guarantee that someone is still processing it // therefore we will fetch a handler from the queue and execute it - // note that fetched handler may be not the one we have added + // note that fetched handler may be not the one that we have added + // even we can fetch no handlers at all :) InvokeHandler(handler); - } - void InvokeHandler(HandlerDescriptor handler) { + protected virtual void InvokeHandler(HandlerDescriptor handler) { switch (m_state) { case SucceededState: handler.Resolve(m_result);