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/update priority #209

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

RaishavHanspal
Copy link

#208 - add a uid to track the promise functions and update the priority on any promise.
also add a new event started to notify when a promise function is executed.

source/index.ts Outdated Show resolved Hide resolved
source/index.ts Outdated Show resolved Hide resolved
source/index.ts Outdated Show resolved Hide resolved
source/priority-queue.ts Outdated Show resolved Hide resolved
source/priority-queue.ts Outdated Show resolved Hide resolved
source/priority-queue.ts Outdated Show resolved Hide resolved
source/priority-queue.ts Outdated Show resolved Hide resolved
@Richienb Richienb mentioned this pull request Jul 17, 2024
source/priority-queue.ts Outdated Show resolved Hide resolved
source/priority-queue.ts Outdated Show resolved Hide resolved
@RaishavHanspal
Copy link
Author

requested changes have been pushed! @Richienb

@Richienb
Copy link
Collaborator

Richienb commented Jul 27, 2024

I think we should allow searching by the object returned by enqueue as well. What do you think? Does there remain a use case where a string id remains more useful?

@RaishavHanspal
Copy link
Author

@Richienb that would be a very nice idea, and will not require id property. The problem that I faced was enqueue accepts RunFunction - which in my understanding is a callback not accessible to the end-user.
The Idea of priority update - is for the user to be able to update the priority on the fly, currently this is achieved by a unique id assigned by user, or this can be passed using the invoke event as added in #210 incase assigned by #idAssigner.

@RaishavHanspal
Copy link
Author

RaishavHanspal commented Aug 9, 2024

@Richienb, @sindresorhus , Please suggest further.

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

Successfully merging this pull request may close these issues.

3 participants