Tbh, it's pretty ridiculous that most browsers don't have a `process.nextTick()` equivalent. `setImmediate()` was meant to be this, but instead we're all stuck writing `setTimeout(cb, 0)`. We should be better than this. https://caniuse.com/#feat=setimmediate …
-
-
Replying to @yoshuawuyts
rIC should do it, but only in FF and Chrome, right? https://caniuse.com/#feat=requestidlecallback …
1 reply 0 retweets 0 likes -
Replying to @haroenv
Nope, not quite - RIC is meant to resolve at the end of a frame, if there's time. We could set a timeout 0 for it, but that's the same level of hacks as setting a timer to resolve on next tick. A method to make something explicitely async would be great.
1 reply 0 retweets 1 like
Replying to @yoshuawuyts @haroenv
In a way I suspect Promises are meant to be this - but that feels like a hack too, as it's not a direct call, but more of a workaround. .setImmediate() seems like the right, standardized, primitive.
6:31 AM - 16 Jan 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.