Open to improvements around setimmediate?
See original GitHub issueI’m new to the project so please forgive me if some history has shown why we use global.setImmediate
to pull in what I would otherwise assume comes from npm install setimmediate
https://github.com/rt2zz/redux-persist/blob/master/src/defaults/asyncLocalStorage.js#L1
Is it possible we could use an ES6 import here or will this always be a global lookup (when undefined)?
A little background: I’m currently working to add redux-offline
and thus redux-persist
support for emberJS developers and the very last blocker is this line so I’m curious what I can do to learn more about it /and possibly unblock it by using an ES6 import of some kind (if possible).
Thank you in advance!
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
In Node.js, setImmediate() callbacks get executed on current ...
If you run the above code whatever is in process.nextTick function will get executed first. The reason is, it runs before event loop...
Read more >setImmediate is not always very immediate #5798 - GitHub
The differentiating factor for setImmediate is that we're always yielding to the loop to let it do IO. Yes, that means that cb...
Read more >Setimmediate NPM | npm.io
setImmediate allows scripts to yield to the browser, executing a given operation asynchronously, in a manner that is typically more efficient and consumes...
Read more >implementation: setImmediate API - Bugzilla@Mozilla
I think there is a bug open to make event loop access OS level stuff less often, at least on OSX. ... This...
Read more >A few tips to improve Nodejs performance - Medium
Most of the points are centered around the event loop(Reactor pattern) only as ... Use setImmediate whenever possible for such use cases.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
great, I will still mull over these potential changes but maybe with a little less urgency 😄
@rt2zz I’ve been able to work around this (to avoid the global hack mentioned above). So for now I’d say “ignore me” and I’ll do my best to learn more about react native/ other (non ember) envs that the community is using this great library in 😃
If you still want to hash out the change above I’m all ears - curious if others would find that useful