Skip to content

Commit 28e3ccb

Browse files
committed
rm redundant executeOperation function
1 parent ef5945c commit 28e3ccb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/unraid-shared/src/util/processing.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class AsyncMutex<T = unknown> {
5555

5656
const op = (operation || this.defaultOperation) as AsyncOperation<U | T>;
5757

58-
const promise = this.executeOperation(op).finally(() => {
58+
const promise = op().finally(() => {
5959
if (this.currentOperation === promise) {
6060
this.currentOperation = null;
6161
}
@@ -64,8 +64,4 @@ export class AsyncMutex<T = unknown> {
6464
this.currentOperation = promise;
6565
return promise;
6666
}
67-
68-
private async executeOperation<U>(operation: AsyncOperation<U>): Promise<U> {
69-
return operation();
70-
}
7167
}

0 commit comments

Comments
 (0)