1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -316,7 +316,7 namespace Implab { | |||||
316 | var medium = new Promise<T>(this, true); |
|
316 | var medium = new Promise<T>(this, true); | |
317 |
|
317 | |||
318 | AddHandler( |
|
318 | AddHandler( | |
319 |
|
|
319 | x => medium.Resolve(x), | |
320 | e => { |
|
320 | e => { | |
321 | try { |
|
321 | try { | |
322 | medium.Resolve(handler(e)); |
|
322 | medium.Resolve(handler(e)); | |
@@ -541,12 +541,12 namespace Implab { | |||||
541 | // if the promise have been resolved while we was adding handler to the queue |
|
541 | // if the promise have been resolved while we was adding handler to the queue | |
542 | // we can't guarantee that someone is still processing it |
|
542 | // we can't guarantee that someone is still processing it | |
543 | // therefore we will fetch a handler from the queue and execute it |
|
543 | // therefore we will fetch a handler from the queue and execute it | |
544 | // note that fetched handler may be not the one we have added |
|
544 | // note that fetched handler may be not the one that we have added | |
|
545 | // even we can fetch no handlers at all :) | |||
545 | InvokeHandler(handler); |
|
546 | InvokeHandler(handler); | |
546 |
|
||||
547 | } |
|
547 | } | |
548 |
|
548 | |||
549 | void InvokeHandler(HandlerDescriptor handler) { |
|
549 | protected virtual void InvokeHandler(HandlerDescriptor handler) { | |
550 | switch (m_state) { |
|
550 | switch (m_state) { | |
551 | case SucceededState: |
|
551 | case SucceededState: | |
552 | handler.Resolve(m_result); |
|
552 | handler.Resolve(m_result); |
General Comments 0
You need to be logged in to leave comments.
Login now