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

setImmediate should probably be replaced with setTimeout(0, #158

Open
shadowcat-mst opened this issue Nov 18, 2024 · 1 comment
Open

setImmediate should probably be replaced with setTimeout(0, #158

shadowcat-mst opened this issue Nov 18, 2024 · 1 comment

Comments

@shadowcat-mst
Copy link

https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate

Appears not to be supported by any current browser, and all the code I've seen that needs immediate microtasks uses setTimeout with a 0 timeout argument.

(yes, this could have been a PR, but researching and confirming I'm not woefully confused here seems like it's going to be most of the effort and since I'm not 100% sure I'm right I can't really PR that part, sorry)

@parzhitsky
Copy link
Member

That's a fair suggestion. Can you show me the use case for observable-to-async-generator in a browser environment? I guess, it's going to be related to an Angular app, right?

Originally, observable-to-async-generator is designed for use in NodeJS environment, where setImmediate is supported. But if removing a reference to setImmediate is the only thing that stands in the way of supporting browsers, I'm all for it.

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

2 participants