176
}
177
const runtime = await this._ensureRuntime(seed);
179
>
// _ensureRuntime was awaiting the bind, in which case the runtime
180
>
// we received is already torn down — but a fresh start() in between
181
>
// is also possible, so verify the active runtime hasn't moved.
182
if (this._disposed || this._runtime !== runtime) {
183
throw new Error(`${this.name} has been disposed`);
184
}
186
>
187
>
let released = false;
188
>
const release = () => {
189
>
if (released) {
190
return;
191
}
193
>
this._releaseHandle(runtime);
194
>
};
195
>
return { runtime, release };
196
}
197