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++=OfE4II!1n)8nE!`DY^`kTCfmBH z9Iczi*N(?Z-eG>&3Qed{P(%*hGUEKs3zsjt zRs8L%pSsaWNEZHsQ=Jz0FI^Sf(~ha)1?c|2&Z>I*$5-6?=`TOL^p@p^zM^hAydP5k zPC8vGwf%N6+P@GVE|bT8B|rNg!fZ|gg<9wcNo{02LmN3RCJ=-u=Z6$#KTz)W54QbJ zq5Hq=^FwU?QU02f;;p~(Uk@I*=oc3rdDpH-s!sXS%bnWwcTn{^MO|j@U$SQZUh4fz z+s4;1=DV95*IoJB(NEpu63(gef4WlLsP8)y7TLL}-+5Ijzx_uk`!5WI*ng?_ALV2J zRp|besj`0~U;D2c9FxOe+QJnpW?%Af<)*{OkG=lHEBD^5yA0~g9}D`wlsR8+_nd=$ gmB+sN%jFl`F{kM>-)|WDxo%OCp~U+a3uWd1A6I+$hyVZp diff --git a/Implab/Promise.cs b/Implab/Promise.cs --- a/Implab/Promise.cs +++ b/Implab/Promise.cs @@ -316,7 +316,7 @@ namespace Implab { var medium = new Promise(this, true); AddHandler( - null, + x => medium.Resolve(x), e => { try { medium.Resolve(handler(e)); @@ -541,12 +541,12 @@ namespace Implab { // 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);