2 ms·
Parallel code runs parallel at the same time (on different CPU cores etc.) Async code is scheduling different parts after each other. It's still running in a s
by johannes1234321 2y ago
Parallel code runs parallel at the same time (on different CPU cores etc.)
Async code is scheduling different parts after each other. It's still running in a single thread (maybe on same core)
aaync essentially is non-blocking IO in many cases. It can also ahieldnsome logic running in a diffefent thread, hidden from that segment of code.
- 333c 2y agoI think your explanation of async, while true, doesn't get at what's special about async. The explanation seems true of (non-parallel) concurrency as well (for example, thread scheduling on a one-core CPU).