|
|
|
|
|
by ttfkam
1007 days ago
|
|
Naive threads and async are for fundamentally different tasks: 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. |
|
If the threads are cheap, there is no point in making this distinction, which greatly simplifies the language. And they can be, we just need programming languages designed for that.