We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef5945c commit 28e3ccbCopy full SHA for 28e3ccb
packages/unraid-shared/src/util/processing.ts
@@ -55,7 +55,7 @@ export class AsyncMutex<T = unknown> {
55
56
const op = (operation || this.defaultOperation) as AsyncOperation<U | T>;
57
58
- const promise = this.executeOperation(op).finally(() => {
+ const promise = op().finally(() => {
59
if (this.currentOperation === promise) {
60
this.currentOperation = null;
61
}
@@ -64,8 +64,4 @@ export class AsyncMutex<T = unknown> {
64
this.currentOperation = promise;
65
return promise;
66
67
-
68
- private async executeOperation<U>(operation: AsyncOperation<U>): Promise<U> {
69
- return operation();
70
- }
71
0 commit comments