You don't know Promises

By Ivan Jovanovic

Elevator Pitch

As you know, JavaScript has a single-threaded, event-loop based concurrency model. It is processing events using asynchronous non-blocking I/O model. Working with asynchronous code can be hard but we got Promises! I’ll show how JavaScript async model works and how to get the best of it!

Description

As you know, JavaScript has a single-threaded, event-loop based concurrency model. It is processing events using asynchronous non-blocking I/O model. Working with asynchronous code can be hard and that’s why we developed mechanisms to help us. We got Promises! Everyone is using them but do we really know how they work? What really happens when we call “new Promise()”. In this talk, we’re going to dive deeper and understand how secret mechanisms of JavaScript async model work and how to make the best of it. We’ll see some bad practices, how to avoid them and how to debug them in case we get in the bigger problem. What will happen if you don’t handle errors properly, or you put sync code in the Promise? Let’s find out!