Chapter 6. Event Loops and Asynchronous Programming

Asynchronous programming is at the core of modern web application development for both front-end and back-end developers. Dart has a great set of tools that allow you to interact with remote services and to write non-blocking code. This chapter looks at the Dart event loop and how to write asynchronous requests.

Concurrent Computing Paradigm

Dart is single threaded. This means that, by default, only a single CPU process is associated with the Dart VM. Having only one process means that your Dart code will execute in a linear fashion and won’t be disrupted. This produces a challenge for developers who are trying to load data from other sources.

Let’s imagine that you have a timer that is displaying ...

Get Write Web Apps with Dart: Develop and Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.