Asynchronous stack traces: why `await` beats `Promise#then()`

Compared to using promises directly, not only can async and await make code more readable for developers — they enable some interesting optimizations in JavaScript engines, too! This write-up is about one such optimization involving stack traces for as…

Compared to using promises directly, not only can async and await make code more readable for developers — they enable some interesting optimizations in JavaScript engines, too! This write-up is about one such optimization involving stack traces for asynchronous code.


Print Share Comment Cite Upload Translate
APA
Mathias | Sciencx (2024-03-28T10:09:30+00:00) » Asynchronous stack traces: why `await` beats `Promise#then()`. Retrieved from https://www.scien.cx/2017/09/12/asynchronous-stack-traces-why-await-beats-promisethen/.
MLA
" » Asynchronous stack traces: why `await` beats `Promise#then()`." Mathias | Sciencx - Tuesday September 12, 2017, https://www.scien.cx/2017/09/12/asynchronous-stack-traces-why-await-beats-promisethen/
HARVARD
Mathias | Sciencx Tuesday September 12, 2017 » Asynchronous stack traces: why `await` beats `Promise#then()`., viewed 2024-03-28T10:09:30+00:00,<https://www.scien.cx/2017/09/12/asynchronous-stack-traces-why-await-beats-promisethen/>
VANCOUVER
Mathias | Sciencx - » Asynchronous stack traces: why `await` beats `Promise#then()`. [Internet]. [Accessed 2024-03-28T10:09:30+00:00]. Available from: https://www.scien.cx/2017/09/12/asynchronous-stack-traces-why-await-beats-promisethen/
CHICAGO
" » Asynchronous stack traces: why `await` beats `Promise#then()`." Mathias | Sciencx - Accessed 2024-03-28T10:09:30+00:00. https://www.scien.cx/2017/09/12/asynchronous-stack-traces-why-await-beats-promisethen/
IEEE
" » Asynchronous stack traces: why `await` beats `Promise#then()`." Mathias | Sciencx [Online]. Available: https://www.scien.cx/2017/09/12/asynchronous-stack-traces-why-await-beats-promisethen/. [Accessed: 2024-03-28T10:09:30+00:00]
rf:citation
» Asynchronous stack traces: why `await` beats `Promise#then()` | Mathias | Sciencx | https://www.scien.cx/2017/09/12/asynchronous-stack-traces-why-await-beats-promisethen/ | 2024-03-28T10:09:30+00:00
https://github.com/addpipe/simple-recorderjs-demo