feat: refactoring project
This commit is contained in:
11
node_modules/webpack/lib/util/Semaphore.js
generated
vendored
11
node_modules/webpack/lib/util/Semaphore.js
generated
vendored
@@ -8,7 +8,6 @@
|
||||
class Semaphore {
|
||||
/**
|
||||
* Creates an instance of Semaphore.
|
||||
*
|
||||
* @param {number} available the amount available number of "tasks"
|
||||
* in the Semaphore
|
||||
*/
|
||||
@@ -41,12 +40,10 @@ class Semaphore {
|
||||
}
|
||||
|
||||
_continue() {
|
||||
if (this.available > 0) {
|
||||
if (this.waiters.length > 0) {
|
||||
this.available--;
|
||||
const callback = /** @type {(function(): void)} */ (this.waiters.pop());
|
||||
callback();
|
||||
}
|
||||
if (this.available > 0 && this.waiters.length > 0) {
|
||||
this.available--;
|
||||
const callback = /** @type {(function(): void)} */ (this.waiters.pop());
|
||||
callback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user