remove locks

This commit is contained in:
Abhinav 2022-08-17 14:30:16 +05:30
parent ee686d430b
commit 037eb1b4d2
2 changed files with 0 additions and 18 deletions

View file

@ -1,4 +0,0 @@
export interface Lock {
wait: Promise<void>;
unlock(): void;
}

View file

@ -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();
},
};
}