• Romain Courteaud's avatar
    Add RSVP#Queue · 7086f51f
    Romain Courteaud authored
    Queue allow to control the execution of a list of promises.
    Especially, it can cancel the list of promises.
    
    The queue is fulfilled only when all pushed promises are fulfilled.
    It gets the latest push promise fulfillmentValue as result.
    
        var queue;
        queue = RSVP.Queue();
        queue.push(function () {
          return 1;
        };
        queue.push(function (value) {
          return value + 1;
        };
        queue.then(function (value) {
          assert(value === 2);
        };
    7086f51f
queue.js 1.87 KB