trigger deadlock checks during defiler.get()
This commit is contained in:
parent
784ab0d87e
commit
506e360f3c
|
@ -155,11 +155,13 @@ export default class Defiler {
|
||||||
if (this._when_found.has(_)) {
|
if (this._when_found.has(_)) {
|
||||||
const { promise, paths } = this._when_found.get(_);
|
const { promise, paths } = this._when_found.get(_);
|
||||||
paths.push(current);
|
paths.push(current);
|
||||||
|
this._check_wave();
|
||||||
await promise;
|
await promise;
|
||||||
} else {
|
} else {
|
||||||
let resolve;
|
let resolve;
|
||||||
const promise = new Promise<void>((res) => (resolve = res));
|
const promise = new Promise<void>((res) => (resolve = res));
|
||||||
this._when_found.set(_, { promise, resolve, paths: [current] });
|
this._when_found.set(_, { promise, resolve, paths: [current] });
|
||||||
|
this._check_wave();
|
||||||
await promise;
|
await promise;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue