Promises, Async, and Beyond: Control Over Time

Опубликовано: 06 Октябрь 2024
на канале: HubSpot Developers
301
16

This is part of our HubSpot Epic Week Series, more info in this video:    • Welcome to Epic Week  

We use them on a daily basis, yet rarely do we put much thought into how they work. Join the talk to understand in depth how asynchronous programming is handled in the most popular JavaScript engine (V8) on the example of Promises. We’ll also have a look at other mechanisms to deal with asynchrony, and how they work.

Piotr Staniów is a Senior Software Engineer II at HubSpot. He is a frontend engineer, currently part of Global Navigation team, previously developed various tools catering to admins, including Audit Logs.

Find him on LinkedIn:   / piotr-staniow  
and make sure to check out his blog: https://piotrstaniow.pl/blog/

00:00 Introduction and Overview
00:48 About the Speaker
01:20 Understanding Asynchronous Code
01:28 Exploring Practical Examples
01:42 Deep Dive into JavaScript Engine
01:53 Implementing Promises
02:08 Understanding Basic Terms
03:09 Asynchrony in JavaScript Engine
04:54 Event Loop and Tasks
07:04 Working with Asynchronous Code
07:13 Understanding Promises
11:43 Async and Await Keywords
14:56 Deep Dive into Call Stack
21:38 Implementing Promise Class
32:12 Conclusion and Final Remarks