This is my favorite version of this so far.
async/await could be useful if one creates an entire program designed on and for it, but it stops being acceptable as soon as I need two .thens inside of each other because I tried to use fetch in a non-async app without race conditions
I honestly don’t know, why async got so popular. It seems like the entire reason for doing it was that some blokes were hellbent on using JS on a server and couldn’t fathom that a second thread might be a good idea.
Async rust with the Tokio Framework is pretty cool. Need none of that JS bloat for async.
Honestly I can’t wrap my head how to effectively put computation into a thread, even with Tokio.
All I want is something like rayon where you got a task queue and you just yeet tasks into a free thread, and await when you actually need it
Might be too much JS/TS influence on me, or that I can’t find a tutorial that would explain in a way that clicks for me
Tokio is for concurrency, not parallelism. Use it for IO stuff. They say rayon is good for that, but I haven’t used that. If you just want something simple, I’d recommend working with threadpool.
?
I PROMISE the rest will come eventually
that is going to take some RESOLVE