mol_wire_lib 1.0.793 → 1.0.794
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node.d.ts +1 -0
- package/node.deps.json +1 -1
- package/node.js +13 -10
- package/node.js.map +1 -1
- package/node.mjs +13 -10
- package/node.test.js +13 -10
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -0
- package/web.deps.json +1 -1
- package/web.js +13 -10
- package/web.js.map +1 -1
- package/web.mjs +13 -10
package/web.mjs
CHANGED
|
@@ -782,16 +782,7 @@ var $;
|
|
|
782
782
|
}
|
|
783
783
|
if (!$mol_promise_like(this.cache))
|
|
784
784
|
return this.cache;
|
|
785
|
-
await Promise.race([
|
|
786
|
-
this.cache,
|
|
787
|
-
new Promise(done => {
|
|
788
|
-
const sub = new $mol_wire_pub_sub;
|
|
789
|
-
const prev = sub.track_on();
|
|
790
|
-
sub.track_next(this);
|
|
791
|
-
sub.track_off(prev);
|
|
792
|
-
sub.absorb = done;
|
|
793
|
-
})
|
|
794
|
-
]);
|
|
785
|
+
await Promise.race([this.cache, this.step()]);
|
|
795
786
|
if (!$mol_promise_like(this.cache))
|
|
796
787
|
return this.cache;
|
|
797
788
|
if (this.cursor === $mol_wire_cursor.final) {
|
|
@@ -799,6 +790,18 @@ var $;
|
|
|
799
790
|
}
|
|
800
791
|
}
|
|
801
792
|
}
|
|
793
|
+
step() {
|
|
794
|
+
return new Promise(done => {
|
|
795
|
+
const sub = new $mol_wire_pub_sub;
|
|
796
|
+
const prev = sub.track_on();
|
|
797
|
+
sub.track_next(this);
|
|
798
|
+
sub.track_off(prev);
|
|
799
|
+
sub.absorb = () => {
|
|
800
|
+
done(null);
|
|
801
|
+
sub.destructor();
|
|
802
|
+
};
|
|
803
|
+
});
|
|
804
|
+
}
|
|
802
805
|
}
|
|
803
806
|
$.$mol_wire_fiber = $mol_wire_fiber;
|
|
804
807
|
})($ || ($ = {}));
|