Skip to content

Conversation

@timgit
Copy link
Contributor

@timgit timgit commented Oct 14, 2018

Similar in spirit to a proprosal in #41. This doesn't necessitate the use case mentioned in that issue, but it would provide a tool which could be used for that purpose. My motivation for this would be to have a hook into the processing without requiring an external interval to poll a queue instance.

@timgit
Copy link
Contributor Author

timgit commented Nov 9, 2018

@szmarczak Updated

@szmarczak
Copy link
Collaborator

LGTM.

@timgit timgit changed the title added onNext event per item in the queue + tests added next event per item in the queue + tests Nov 9, 2018
@timgit
Copy link
Contributor Author

timgit commented Dec 29, 2018

@sindresorhus Requested changes pushed.

@sindresorhus sindresorhus changed the title added next event per item in the queue + tests Add active event Feb 20, 2019
Copy link
Collaborator

@szmarczak szmarczak left a comment

Choose a reason for hiding this comment

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

emit('active') should be placed in _tryToStartAnother right before dequeue()()

@sindresorhus sindresorhus merged commit 16f3928 into sindresorhus:master Feb 21, 2019
@RickWong
Copy link

RickWong commented Feb 22, 2019

Does the dependency on the "events" Node.js package not break browser compatibility? If so, a callback/observable implementation could be an alternative solution, and would be more light-weight.

Perhaps this type of change could also be a major version bump.

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.

4 participants