diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/jest-worker/build/PriorityQueue.d.ts | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/jest-worker/build/PriorityQueue.d.ts')
| -rw-r--r-- | node_modules/jest-worker/build/PriorityQueue.d.ts | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/node_modules/jest-worker/build/PriorityQueue.d.ts b/node_modules/jest-worker/build/PriorityQueue.d.ts deleted file mode 100644 index d6bcf4cf..00000000 --- a/node_modules/jest-worker/build/PriorityQueue.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import type { QueueChildMessage, TaskQueue } from './types'; -export declare type ComputeTaskPriorityCallback = (method: string, ...args: Array<unknown>) => number; -declare type QueueItem = { - task: QueueChildMessage; - priority: number; -}; -/** - * Priority queue that processes tasks in natural ordering (lower priority first) - * accoridng to the priority computed by the function passed in the constructor. - * - * FIFO ordering isn't guaranteed for tasks with the same priority. - * - * Worker specific tasks with the same priority as a non-worker specific task - * are always processed first. - */ -export default class PriorityQueue implements TaskQueue { - private _computePriority; - private _queue; - private _sharedQueue; - constructor(_computePriority: ComputeTaskPriorityCallback); - enqueue(task: QueueChildMessage, workerId?: number): void; - _enqueue(task: QueueChildMessage, queue: MinHeap<QueueItem>): void; - dequeue(workerId: number): QueueChildMessage | null; - _getWorkerQueue(workerId: number): MinHeap<QueueItem>; -} -declare type HeapItem = { - priority: number; -}; -declare class MinHeap<TItem extends HeapItem> { - private _heap; - peek(): TItem | null; - add(item: TItem): void; - poll(): TItem | null; -} -export {}; |
