Ember.run.later e setTimeout comparando o cenário.

Nos internos do Ember (Backburner), pode-se descobrir que o Ember.run.later basicamente chama setTimeout () por baixo do capô, mas respeitando a ordem de disparo pela qual outros tempos limites foram adicionados à fila.
Mais sobre isso em uma postagem do blog em breve em www.estebansastre.com

import Ember from 'ember';

export default Ember.Controller.extend({
appName
: "Timers comparison",
init
: function() {
this._super();
this.set('myErrCountLater', 0);
this.set('myErrCountTimeout', 0);
this.myFunc(0);
this.myOtherFunc(0);
},
myFunc
: function(errorCount) {
if (errorCount < 7) {
self
= this;
this.set('myErrCountLater', errorCount);
console
.log("Error Count Later is " + errorCount + ", repeating");
Ember.run.later(this, function () {
return self.myFunc(errorCount+1);
}, 1500);
}
else {
console
.log("Everything failed");
}
},
myOtherFunc
: function(errorCount) {
if (errorCount < 7) {
self
= this;
this.set('myErrCountTimeout', errorCount)
console
.log("Error Count Timeout is " + errorCount + ", repeating");
setTimeout
(function() {
return self.myOtherFunc(errorCount + 1);
}, 1500);
}
else {
console
.log("Everything failed");
}
}
});