effectScope scopes doubly-linked list

This commit is contained in:
Zihao Wu 2025-06-27 21:05:55 +08:00
parent a0b78f6322
commit 1f63cf607f
1 changed files with 12 additions and 14 deletions

View File

@ -61,11 +61,10 @@ export class EffectScope {
pause(): void {
if (this._active) {
this._isPaused = true
let i, l
for (let child = this.scopes; child != undefined; child = child.nextEffectScope) {
child.pause();
}
for (i = 0, l = this.effects.length; i < l; i++) {
for (let i = 0, l = this.effects.length; i < l; i++) {
this.effects[i].pause()
}
}
@ -78,11 +77,10 @@ export class EffectScope {
if (this._active) {
if (this._isPaused) {
this._isPaused = false
let i, l
for (let child = this.scopes; child != undefined; child = child.nextEffectScope) {
child.resume();
}
for (i = 0, l = this.effects.length; i < l; i++) {
for (let i = 0, l = this.effects.length; i < l; i++) {
this.effects[i].resume()
}
}
@ -141,7 +139,7 @@ export class EffectScope {
this.cleanups.length = 0
for (let child = this.scopes; child != undefined; child = child.nextEffectScope) {
child.stop();
child.stop(true);
}
this.scopes = this.scopesTail = undefined;