Yedi Zhang

Results 2 comments of Yedi Zhang

```js function AsyncPool(limit) { this.limit = limit this.executingQueue = [] this.queue = [] this.finished = [] } AsyncPool.prototype.add = function (fn) { this.queue.push(fn) } AsyncPool.prototype.run = async function () {...

```js let _LazyMan = function (name) { this.taskQueue = [] let that = this // 全部push完成之后,开始执行微任务队列 // Promise.resolve().then(() => { // // 将要执行的任务,全部丢进微任务队列执行 // let p = Promise.resolve() // that.taskQueue.map(t...