|
|
|
|
|
by gorjusborg
1007 days ago
|
|
There is a certain amount of Stockholm syndrome built into the current acceptance of async programming paradigms. Linear code is far easier to reason about, but that is easy to forget once someone has become accostomed to thinking in async constructs. The thing is, there are only so many things a person can mentally juggle. Removing the consideration of a whole dimension of issues means the developer can take on more useful complexity. |
|
Threads are for working in parallel, splitting a single compute-intensive tasks into many.
Async is for waiting in parallel for disk I/O results, database queries, network responses, etc.
The former are for doing more work. The latter is for efficiently waiting for others to do their work without using a bunch of excess thread context resources.
You don't reduce complexity by ignoring the difference between two quite distinct use cases. That's false simplicity.