Commit d58a4846 authored by Romain Courteaud's avatar Romain Courteaud

Queue: speed up execution

parent 58953a31
import { Promise } from "./promise";
import { delay } from "./timeout";
import { resolve } from "./resolve";
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
function ResolvedQueueError(message) {
......@@ -49,7 +49,7 @@ var Queue = function() {
notify = progress;
}, canceller);
promise_list.push(delay());
promise_list.push(resolve());
promise_list.push(promise_list[0].then(function () {
promise_list.splice(0, 2);
if (promise_list.length === 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment