remove locks
This commit is contained in:
parent
ee686d430b
commit
037eb1b4d2
|
@ -1,4 +0,0 @@
|
|||
export interface Lock {
|
||||
wait: Promise<void>;
|
||||
unlock(): void;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
import { Lock } from 'types/lock';
|
||||
|
||||
export function newLock(): Lock {
|
||||
let resolver: () => void = null;
|
||||
const wait = new Promise<void>((resolve) => {
|
||||
resolver = resolve;
|
||||
});
|
||||
return {
|
||||
wait,
|
||||
unlock: () => {
|
||||
resolver();
|
||||
},
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue