Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Ability to clear the queue #18

Closed
cbwk opened this issue Dec 31, 2019 · 1 comment · Fixed by #20
Closed

Feature request: Ability to clear the queue #18

cbwk opened this issue Dec 31, 2019 · 1 comment · Fixed by #20

Comments

@cbwk
Copy link

cbwk commented Dec 31, 2019

I'm not sure if this is a feature you'd want here, happy to open a PR if so.

In addition to being able to read the values for activeCount and pendingCount, I would like also to be able to clear the queue.

The driving use case is that I would like to only run with the latest arguments if there are pending calls. E.g. I have a function that performs an expensive API based validation, and I only care about the current state of things, not the intermediary state.

Is this a feature that you believe should live here? Thanks in advance.

@sindresorhus
Copy link
Owner

Sure, sounds useful for when you need more control. PR welcome. Make sure to document some example use-cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants