框架
版本
防抖器 API 参考
节流器 API 参考
速率限制器 API 参考
队列 API 参考
批处理器 API 参考

异步排队器状态

接口: AsyncQueuerState<TValue>

定义于: async-queuer.ts:7

类型参数

TValue

属性

activeItems

ts
activeItems: TValue[];
activeItems: TValue[];

定义于: async-queuer.ts:11

当前由队列管理器处理的项目


addItemCount

ts
addItemCount: number;
addItemCount: number;

定义于: async-queuer.ts:15

调用 addItem 的次数(用于减少计算)


errorCount

ts
errorCount: number;
errorCount: number;

定义于: async-queuer.ts:19

导致错误的任务执行次数


expirationCount

ts
expirationCount: number;
expirationCount: number;

定义于: async-queuer.ts:23

由于过期而从队列中移除的项目数量


isEmpty

ts
isEmpty: boolean;
isEmpty: boolean;

定义于: async-queuer.ts:27

队列是否没有要处理的项目(items 数组为空)


isFull

ts
isFull: boolean;
isFull: boolean;

定义于: async-queuer.ts:31

队列是否已达到最大容量


空闲

ts
isIdle: boolean;
isIdle: boolean;

定义于: async-queuer.ts:35

队列当前是否未处理任何项目


isRunning

ts
isRunning: boolean;
isRunning: boolean;

定义于: async-queuer.ts:39

队列是否处于活动状态,并将自动处理项目


items

ts
items: TValue[];
items: TValue[];

定义于: async-queuer.ts:43

当前等待处理的项目数组


itemTimestamps

ts
itemTimestamps: number[];
itemTimestamps: number[];

定义于: async-queuer.ts:47

添加项目到队列以进行过期跟踪的时间戳


lastResult

ts
lastResult: any;
lastResult: any;

定义于: async-queuer.ts:51

最近一次任务执行的结果


pendingTick

ts
pendingTick: boolean;
pendingTick: boolean;

定义于: async-queuer.ts:55

队列是否有待处理的超时以处理下一个项目


rejectionCount

ts
rejectionCount: number;
rejectionCount: number;

定义于: async-queuer.ts:59

被拒绝添加到队列中的项目数量


settledCount

ts
settledCount: number;
settledCount: number;

定义于: async-queuer.ts:63

已完成(成功或出错)的任务执行次数


size

ts
size: number;
size: number;

定义于: async-queuer.ts:67

队列中当前的项目数量


status

ts
status: "idle" | "running" | "stopped";
status: "idle" | "running" | "stopped";

定义于: async-queuer.ts:71

当前处理状态 - 不处理时为 'idle',活动时为 'running',暂停时为 'stopped'


successCount

ts
successCount: number;
successCount: number;

定义于: async-queuer.ts:75

成功完成的任务执行次数

我们的合作伙伴
Code Rabbit
Unkey
订阅 Bytes

您的每周 JavaScript 资讯。每周一免费发送给超过 10 万开发者。

Bytes

无垃圾邮件。您可以随时取消订阅。

订阅 Bytes

您的每周 JavaScript 资讯。每周一免费发送给超过 10 万开发者。

Bytes

无垃圾邮件。您可以随时取消订阅。