Back to articles
Synchronous, asynchronous, concurrent, parallel: the 4 concepts explained in Go

Synchronous, asynchronous, concurrent, parallel: the 4 concepts explained in Go

via Dev.toOdilon HUGONNOT

These four words show up everywhere in docs, articles, and interviews. And they get mixed up constantly — including by experienced developers. "Asynchronous" and "concurrent" don't mean the same thing. "Parallel" and "concurrent" don't either. And a program can be all four at once, or only two, and that changes what it actually does. This article completes the previous one on concurrency and parallelism by adding the synchronous/asynchronous dimension, and showing how all four concepts fit together in Go. Synchronous vs asynchronous: a question of waiting These two words are not about "how many tasks are running at the same time". They're about what your code does while it's waiting for a response . Synchronous : you send a request, you stop and wait for the response before doing anything else. Like calling someone on the phone and staying silent until they answer. Asynchronous : you send a request, you keep doing other things, and you handle the response when it arrives. Like sending

Continue reading on Dev.to

Opens in a new tab

Read Full Article
1 views

Related Articles