Skip to content

Commit

Permalink
feat(async-pool): add length
Browse files Browse the repository at this point in the history
  • Loading branch information
fupengl committed Mar 21, 2021
1 parent a812912 commit b3d206c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/promise/async-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ function asyncPool(options: AsyncPoolOpts) {
queue.length = 0;
}

return { executor, clear };
function length() {
return queue.length;
}

return { executor, clear, length };
}

export default asyncPool;

1 comment on commit b3d206c

@vercel
Copy link

@vercel vercel bot commented on b3d206c Mar 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

The most recent charge for your active payment method has failed. Please update it here: https://vercel.com/teams/planjs/settings/billing.

Please sign in to comment.