Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: add waitForTimersAndIntervals #156

Closed

Conversation

kellyselden
Copy link
Member

After reading emberjs/ember.js#3008, I think I understand it as Ember.run.later blocks and setTimeout doesn't block wait(). My scenario is a library I'm using is using setTimeout (here), yet I still want my wait() call to block.
I whipped this code up quick to test it out and it works as expected. The implementation is probably terrible. I just wanted to start a conversation.

@kellyselden
Copy link
Member Author

BTW, I'm also tackling this problem from a different angle here machty/ember-concurrency#55

@kellyselden kellyselden force-pushed the waitForTimersAndIntervals branch from ac37138 to 7a66d8c Compare July 30, 2016 03:08
@Turbo87
Copy link
Member

Turbo87 commented Oct 14, 2017

I'm a little worried about overwriting the native functions like this. @kellyselden is this still a relevant to you?

@kellyselden
Copy link
Member Author

@Turbo87 It's still being successfully used here. I'm not sure if there has been a better way discovered of how to do this.

@kellyselden kellyselden force-pushed the waitForTimersAndIntervals branch from 7a66d8c to 8732d39 Compare October 14, 2017 17:26
@Turbo87 Turbo87 requested a review from rwjblue April 19, 2020 10:53
@rwjblue
Copy link
Member

rwjblue commented Apr 20, 2020

I'm pretty uncomfortable with monkey patching setTimeout & co. I think an addon can easily do this and leverage the new ember-test-waiters to provide the waiting experience.

Going to close this in favor of that path forward....

@rwjblue rwjblue closed this Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants