摘要: function batchRequest(urls,maxNum){ return new Promise(resolve=>{ if(urls.length 0){ resolve([]); return; } const results=[]; let index=0; let finishC 阅读全文
posted @ 2024-05-16 17:50 howhy 阅读(4) 评论(0) 推荐(0) 编辑
摘要: class SuperTask { constructor(parallelCount = 2) { this.parallelCount = parallelCount; this.tasks = []; this.runningCount = 0; } add(task) { return ne 阅读全文
posted @ 2024-05-16 17:34 howhy 阅读(3) 评论(0) 推荐(0) 编辑