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

why not medikoo/next-tick? #39

Closed
vvo opened this issue Apr 12, 2015 · 4 comments
Closed

why not medikoo/next-tick? #39

vvo opened this issue Apr 12, 2015 · 4 comments

Comments

@vvo
Copy link

vvo commented Apr 12, 2015

I ran into issues as well as #37 and #38 and was wondering if we should switch to https://github.com/medikoo/next-tick?

It's a dedicated next-tick project with clear goals (in term of what to use as nextTick).

Thoughts?

@vvo
Copy link
Author

vvo commented Apr 13, 2015

I should not that next-tick is suffering from the same problem as process.nextTick here.

medikoo/next-tick#3

@vvo vvo closed this as completed Apr 23, 2015
@STRML
Copy link

STRML commented Sep 1, 2016

Now that next-tick has fixed that issue, is it reasonable to put this back in?

Currently the nextTick implementation relies on setTimeout(fn, 0).

@calvinmetcalf
Copy link
Collaborator

This has significantly better compatibility then next-tick and intentionally has no deps so works without any sort of builder, it also works in some situations that next-tick doesn't yet such as when test runners stub out global methods we use and it handles multiple arguments being passed to nextTick (which next-tick hasn't been updated to handle).

I'd also point out that this only relies on setTimeout on the first call but not recursive calls so this implementation likely has much lower latency if you were to bench mark it.

@STRML
Copy link

STRML commented Sep 1, 2016

Thanks! It's somewhat difficult to read so I appreciate this overview. I absolutely understand not wanting to introduce dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants