This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Fixed bug with PromiseQueue instances sharing same queue.#7485
Merged
njx merged 2 commits intoadobe:masterfrom Apr 15, 2014
Merged
Fixed bug with PromiseQueue instances sharing same queue.#7485njx merged 2 commits intoadobe:masterfrom
njx merged 2 commits intoadobe:masterfrom
Conversation
Fixed issue with Async.PromiseQueue instances sharing the same queue in the prototype. Fix is to define _queue and _curPromise in the constructor. Added to Async-test to test for this case.
|
D'oh! Will review. |
There was a problem hiding this comment.
Should change the initialization in the prototype to null to avoid confusion (since the empty array there would never be used anyway).
|
Reviewed - just a couple of small nits. I also looked through the rest of the codebase and found a couple of other places where I'd made the same mistake - see #7489. |
Set PromiseQueue.prototype._queue to null to avoid confusion. Removed unneeded _curPromise initialization in constructor. Signed-off-by: jayther <jayther@gmail.com>
Contributor
Author
|
Applied the nits, should be good. |
|
Thanks, merging. |
njx
pushed a commit
that referenced
this pull request
Apr 15, 2014
Fixed bug with PromiseQueue instances sharing same queue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed issue with Async.PromiseQueue instances sharing the same queue in the prototype.
Fix is to define _queue and _curPromise in the constructor.
Added to Async-test to test for this case.
(From issue #7484 )