Remix.run Logo
dragonwriter 2 days ago

> async, parallelism, concurrency, why not all three?

async is a concurrency mechanism.

JackSlateur 2 days ago | parent [-]

async enables a concurrency potential, nothing more

That is, if you use external stuff and can delegate work to them, then async is concurrent (async io for instance)

But if you do not, then async is regular code with extra steps

DanielHB 2 days ago | parent [-]

I do not understand what you mean, parallelism is running multiple concurrent execution blocks running in multiple physical CPUs at the same time.

My understanding is that JS can't do that (besides service workers which are non-shared memory), but it still has multiple concurrent code-blocks being executed at the same time, just in linear fashion. It will just never use multiple CPU cores at the same time (unless calling some non-JS non-shared-memory code)