Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Conversation

@jayther
Copy link
Contributor

@jayther jayther commented Apr 11, 2014

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 )

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.
@njx njx self-assigned this Apr 11, 2014
@njx
Copy link

njx commented Apr 11, 2014

D'oh! Will review.

Copy link

Choose a reason for hiding this comment

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

Should change the initialization in the prototype to null to avoid confusion (since the empty array there would never be used anyway).

@njx
Copy link

njx commented Apr 11, 2014

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 <[email protected]>
@jayther
Copy link
Contributor Author

jayther commented Apr 12, 2014

Applied the nits, should be good.

@njx
Copy link

njx commented Apr 15, 2014

Thanks, merging.

njx pushed a commit that referenced this pull request Apr 15, 2014
Fixed bug with PromiseQueue instances sharing same queue.
@njx njx merged commit 336fe54 into adobe:master Apr 15, 2014
@jayther jayther deleted the promisequeuesharefix branch April 15, 2014 10:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants