What Weâve Learned
In this chapter, weâve seen how JavaScriptâs single-threadedness is both a blessing and a curse. In the right hands, it makes for beautiful code free of the terrifying race conditions that plague multithreaded apps. But you need to develop the right mind-setâand the right techniques.
The rest of this book is concerned with libraries and design patterns for working with events in JavaScript. All of the examples weâll look at will run in either mainstream browsers or unmodified Node.js. However, writing JavaScript isnât the only way to produce JavaScript code. For an overview of some interesting alternatives, see Appendix 1, âTools for Taming JavaScriptâ.
It bears mention here that there is one kind of multithreading ...
Get Async JavaScript 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.