2 ms·
Async/await and threading+blocking are ultimately duals of each other. You can express the same semantics with one model or the other, regardless of the underly
by tsimionescu 2y ago
Async/await and threading+blocking are ultimately duals of each other. You can express the same semantics with one model or the other, regardless of the underlying implementation of either. You could in fact implement multi-threading and blocking on top a task-based API if you wanted to - e.g. you could implement a Java style Threads API in JS if you really wanted to (of course, code would still run single threaded, like in old times with single-CPU systems).