Remix.run Logo
groundzeros2015 5 hours ago

Such as? The entire premise of async is that callbacks were a mistake because they broke sequential reasoning and control.

Every explanation of the feature starts with managing callback hell.

repelsteeltje 4 hours ago | parent | next [-]

Beware, they are different concepts.

Threads offer concurrent execution, async (futures) offer concurrent waiting. Loosely speaking, threads make sense for CPU bound problems, while async makes sense for IO bound problems.

groundzeros2015 8 minutes ago | parent [-]

Why? You write the same code with async await but with a keyword at the beginning of every function.

codedokode 4 hours ago | parent | prev [-]

The callbacks should be just hidden from programmer, that's what async/await are for.