emberjs/ember.js — pull request #2294 by joliss (2013-03-18 01:01:13+00:00)
Title: Deprecate Ember.run.next?

It seems that `Ember.run.next` is mostly used to hack around ordering issues, e.g. to defer stuff until the DOM has updated.

`Ember.run.next` might be very tempting, because it's quick and easy and "basically works". But in reality, it's just `setTimeout(fn, 1)` with a lot of lipstick on it, which is to say it's non-deterministic. That's bad in many ways. In particular, it gives you lots of grief once you try to test your code.

We're not using `run.next` in Ember core at all (save for [one hackish instance in the test code](https://github.com/emberjs/ember.js/blob/1dc0735e54afdcacbc9b3da937d2ed27a90d9601/packages/ember-handlebars/tests/helpers/each_test.js#L345)).

I'm wondering if we should deprecate it. @machty suggests we should be encouraging people to use the `afterRender` queue. That seems much better.

What do you guys think?