yui/yui3 — pull request #541 by maximerety (2013-03-25 11:03:38+00:00)
Title: Async queue bug

This pull request contains fixes for 2 separate bugs (2 commits containing new test cases demonstrating the bugs, 2 commits containing the fixes).

1. the 'complete' event is not always fired when the queue has been stopped.

2. when a callback contains an 'until' method depending on the result of the previous callback execution, it can break if the previous callback is paused.

The second one occurs because 'run' always gets the the next callback, thus always executes the next callback's 'until' function. But 'run' doesn't need to get the next callback at all when the current callback execution says not to continue running the queue (for exemple when 'pause' or 'stop' has been called).

Thanks for having a look.