What is concurrency? How is it different from parallelism? JavaScript is single-threaded on the event loop, so how does its asynchrony fit into the mix?
These are great questions, but sadly, I think most JS developers are not really asking them enough. The concepts behind writing concurrent code are incredibly important, but we tend to only focus on the API provided to us by some library or framework. These APIs have a tremendous capability to shape our thoughts about the underlying functionalities, and often not in accurate or productive ways.
I want us to talk first about the concepts around concurrency before we focus on what we can do with some API or pattern. Don’t worry: following parts of this blog post series will talk more about APIs, if that’s what really gets you excited. But don’t skip over these concepts.
Your new post is loading...