BackburnerJS / backburner.js

A rewrite of the Ember.js run loop as a generic microlibrary
MIT License
392 stars 80 forks source link

Make `now` configurable so time can freeze during backburner run loop #263

Closed alias-mac closed 6 years ago

alias-mac commented 6 years ago

This allow us to use fake timers, such as sinon.useFakeTimers, to check the state of the app during the run loop.

For example: if a popup is supposed to be triggered in X ms from now and it will show to the user during Y ms, then this will allow us to use fake timers to pause between X and Y and check the state of the Ember app at that exact time.

rwjblue commented 6 years ago

This brings now into parity with the other platform concepts (setTimeout, clearTimeout, etc).

stefanpenner commented 6 years ago

This brings now into parity with the other platform concepts (setTimeout, clearTimeout, etc). Revert View details

I think we have it the way it is by design. For example, the autorun flush should not be interuptable.

rwjblue commented 6 years ago

Ya, I think I’m not grok’ing something here. Can we chat about this in higher bandwidth so I can make sure I understand?