Async - sgml/signature GitHub Wiki
async function wait(ms) { await new Promise(resolve => { setTimeout(resolve, ms); }); }
if (String(this.xhr.keyword).trim() === String(this.handleChange.keyword).trim()) { GO(); } userIDs.reduce( async (previousPromise, nextID) => { await previousPromise; return methodThatReturnsAPromise(nextID); }, Promise.resolve()); while (k < len) { if (k in o) { value = callback(value, o[k], k, o); } k++; } function methodThatReturnsAPromise(id) { return new Promise((resolve, reject) => { setTimeout(() => { console.log(`Processing ${id}`); resolve(id); }, 1000); }); } let result = [1,2,3].reduce( (accumulatorPromise, nextID) => { return accumulatorPromise.then(() => { return methodThatReturnsAPromise(nextID); }); }, Promise.resolve()); result.then(e => { console.log("Resolution is complete! Let's party.") });
- https://gist.github.com/beaucharman/e46b8e4d03ef30480d7f4db5a78498ca
- https://codeburst.io/throttling-and-debouncing-in-javascript-646d076d0a44?gi=4117630fb481
- https://medium.com/@TCAS3/debounce-deep-dive-javascript-es6-e6f8d983b7a1
- http://2ality.com/2016/10/async-function-tips.html
- https://alligator.io/js/async-functions/
- https://ktutnik.github.io/destructuring-async-await/
- https://stackoverflow.com/questions/35612428/call-async-await-functions-in-parallel
- https://hacks.mozilla.org/2016/12/asyncawait-arrive-in-firefox/
- http://ericniebler.com/2017/08/17/ranges-coroutines-and-react-early-musings-on-the-future-of-async-in-c/
- https://bytearcher.com/articles/not-everything-goes-to-worker-threads/
- https://leanpub.com/javascriptallongesix/read
- http://richardartoul.github.io/javascript/2015/07/16/promises-generators.html
- http://blog.tabforacause.org/post/115245771331/using-reactjs-and-application-cache-for-a-fast
- https://hackernoon.com/async-await-generators-promises-51f1a6ceede2
- http://davidmieloch.com/2017/07/15/async-await-promises-then-magic.html
- https://hallski.org/blog/async-await-with-generators
- https://itnext.io/javascript-asynchronous-method-comparison-callbacks-promises-async-await-generators-e689d579aba7
- https://davidwalsh.name/promises-results
- https://developer.salesforce.com/blogs/2020/01/learn-moar-in-spring-20-implementing-promises-with-transaction-finalizers.html
- http://2ality.com/2017/08/promise-callback-data-flow.html
- https://theoestudio.com/async-await-chaining/
- https://stackoverflow.com/questions/50284005/handle-chained-promise-errors-in-async-await
- https://nmaggioni.xyz/2016/10/13/Avoiding-Promise-all-fail-fast-behavior/
- https://stackoverflow.com/questions/50284005/handle-chained-promise-errors-in-async-await
- https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html
- https://css-tricks.com/why-using-reduce-to-sequentially-resolve-promises-works/
- http://2ality.com/2014/10/es6-promises-api.html
- https://javascript.info/async-await
- https://www.sitepoint.com/flow-control-callbacks-promises-async-await/
- https://www.w3.org/TR/requestidlecallback/
- https://jonbellah.com/articles/async-await/
- https://developers.google.com/web/ilt/pwa/working-with-promises
- http://2ality.com/2016/03/promise-rejections-vs-exceptions.html
- https://jestjs.io/docs/en/asynchronous
- https://jestjs.io/docs/en/jest-object#jestspyonobject-methodname
- https://stackoverflow.com/questions/49073178/jest-spyon-method-that-return-a-promise
- https://itnext.io/a-pragmatic-overview-of-async-hooks-api-in-node-js-e514b31460e9
- https://www.freecodecamp.org/news/promise-all-in-javascript-with-example-6c8c5aea3e32/
- https://2ality.com/2019/08/promise-combinators.html
- https://sungcodes-v2.netlify.com/blog/2019/05/18/promise-race-vs-promise-any-and-promise-all-vs-promise-allsettled/
- https://medium.com/@ian.mundy/async-event-handlers-in-react-a1590ed24399
- https://github.com/facebook/react/issues/11508
- https://github.com/facebook/react/issues/1159
- https://github.com/facebook/react/issues/11911
- https://github.com/facebook/react/issues/12441
- https://github.com/facebook/react/issues/7415
- https://github.com/facebook/react/pull/12078
- https://github.com/facebook/react/issues/11401
- https://github.com/whatwg/xhr/issues/20
- https://github.com/salesforce-ux/test-drive-brown-bag/blob/master/__tests__/components/App.spec.jsx
- https://medium.com/@TheJesseLewis/promisifying-node-js-fs-with-es8-async-await-1ab98ff695d
- https://hackernoon.com/node8s-util-promisify-is-so-freakin-awesome-1d90c184bf44
- https://dev.to/blacksonic/what-does-javascript-promise-us-for-2020-4l1i
- https://news.ycombinator.com/item?id=15099927
- https://medium.com/better-programming/dynamic-promise-chaining-af9c5cb87f2e
- https://blog.logrocket.com/promise-chaining-is-dead-long-live-async-await-445897870abc/