Skip to content

Commit 14a1b3a

Browse files
committed
docs: refine queueing code comment
Signed-off-by: Jérôme Benoit <[email protected]>
1 parent aaad1df commit 14a1b3a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/queues/abstract-fixed-queue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export abstract class AbstractFixedQueue<T> implements IFixedQueue<T> {
5959

6060
/** @inheritdoc */
6161
public delete(data: T): boolean {
62+
if (this.empty()) return false
6263
let currentPhysicalIndex = this.start
6364
let logicalIndex = -1
6465
for (let i = 0; i < this.size; i++) {

src/queues/fixed-priority-queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class FixedPriorityQueue<T> extends AbstractFixedQueue<T>
1414
/**
1515
* Constructs a FixedPriorityQueue.
1616
* @param size - Fixed queue size. @defaultValue defaultQueueSize
17-
* @param agingFactor - Aging factor to apply to items in priority points per millisecond. A higher value makes tasks age faster.
17+
* @param agingFactor - Aging factor to apply to items in priority points per millisecond. A higher value makes items age faster.
1818
* @returns IFixedQueue.
1919
*/
2020
public constructor(size?: number, agingFactor = 0.001) {

0 commit comments

Comments
 (0)