@reactive-js/core
Advanced tools
Comparing version 0.5.2 to 0.7.0
@@ -458,5 +458,6 @@ 'use strict'; | ||
try { | ||
while (this.delegate.move()) { | ||
const { delegate } = this; | ||
while (delegate.move()) { | ||
if (!hadCurrent || | ||
!this.equality(prevCurrent, this.delegate.current)) { | ||
!this.equality(prevCurrent, delegate.current)) { | ||
break; | ||
@@ -502,5 +503,6 @@ } | ||
this.reset(); | ||
if (this.delegate.move()) { | ||
const { delegate } = this; | ||
if (delegate.move()) { | ||
try { | ||
this.current = this.mapper(this.delegate.current); | ||
this.current = this.mapper(delegate.current); | ||
} | ||
@@ -507,0 +509,0 @@ catch (cause) { |
{ | ||
"name": "@reactive-js/core", | ||
"version": "0.5.2", | ||
"version": "0.7.0", | ||
"keywords": [ | ||
@@ -45,3 +45,3 @@ "asynchronous", | ||
}, | ||
"gitHead": "1cea37a44455024d6f37b1e82fa072111238886c" | ||
"gitHead": "5578eb7377a7ad1ea2391f6fecc7916b81522ebf" | ||
} |
@@ -117,4 +117,5 @@ 'use strict'; | ||
notify(next) { | ||
const concatSink = createDelegatingSink(this.delegate); | ||
disposable.addDisposableDisposeParentOnChildError(this.delegate, concatSink); | ||
const { delegate } = this; | ||
const concatSink = createDelegatingSink(delegate); | ||
disposable.addDisposableDisposeParentOnChildError(delegate, concatSink); | ||
next.sink(concatSink); | ||
@@ -121,0 +122,0 @@ concatSink.dispose(); |
@@ -105,4 +105,5 @@ 'use strict'; | ||
let yieldError = option.none; | ||
const { scheduler } = this; | ||
const oldCurrentScheduler = currentScheduler; | ||
currentScheduler = this.scheduler; | ||
currentScheduler = scheduler; | ||
try { | ||
@@ -121,3 +122,3 @@ this.f(); | ||
if (option.isSome(yieldError)) { | ||
this.scheduler.schedule(this, yieldError); | ||
scheduler.schedule(this, yieldError); | ||
} | ||
@@ -247,7 +248,7 @@ else { | ||
next.priority < current.priority; | ||
const { yieldRequested } = this; | ||
if (this.inContinuation) { | ||
const { inContinuation, yieldRequested } = this; | ||
if (inContinuation) { | ||
this.yieldRequested = false; | ||
} | ||
return (this.inContinuation && | ||
return (inContinuation && | ||
(yieldRequested || | ||
@@ -283,9 +284,9 @@ this.isDisposed || | ||
if (!continuation.isDisposed) { | ||
const { now } = this; | ||
const { current, now } = this; | ||
const dueTime = Math.max(now + delay, now); | ||
const task = this.inContinuation && | ||
option.isSome(this.current) && | ||
this.current.continuation === continuation && | ||
option.isSome(current) && | ||
current.continuation === continuation && | ||
delay <= 0 | ||
? this.current | ||
? current | ||
: { | ||
@@ -437,7 +438,7 @@ taskID: this.taskIDCounter++, | ||
get shouldYield() { | ||
const { yieldRequested } = this; | ||
if (this.inContinuation) { | ||
const { inContinuation, yieldRequested } = this; | ||
if (inContinuation) { | ||
this.yieldRequested = false; | ||
} | ||
return (this.inContinuation && | ||
return (inContinuation && | ||
(yieldRequested || | ||
@@ -515,8 +516,8 @@ this.now > this.startTime + this.yieldInterval || | ||
get shouldYield() { | ||
const { yieldRequested } = this; | ||
if (this.inContinuation) { | ||
const { inContinuation, yieldRequested } = this; | ||
if (inContinuation) { | ||
this.microTaskTicks++; | ||
this.yieldRequested = false; | ||
} | ||
return (this.inContinuation && | ||
return (inContinuation && | ||
(yieldRequested || this.microTaskTicks >= this.maxMicroTaskTicks)); | ||
@@ -523,0 +524,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
498362
12572