mol_wire_lib 1.0.1216 → 1.0.1217

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/web.mjs CHANGED
@@ -809,7 +809,7 @@ var $;
809
809
  }
810
810
  return this.cache;
811
811
  }
812
- async async() {
812
+ async async_raw() {
813
813
  while (true) {
814
814
  this.fresh();
815
815
  if (this.cache instanceof Error) {
@@ -825,6 +825,12 @@ var $;
825
825
  }
826
826
  }
827
827
  }
828
+ async() {
829
+ const promise = this.async_raw();
830
+ if (!promise.destructor)
831
+ promise.destructor = () => this.destructor();
832
+ return promise;
833
+ }
828
834
  step() {
829
835
  return new Promise(done => {
830
836
  const sub = new $mol_wire_pub_sub;