One of the funny things to me about the way we use languages with coroutines (or "async" if you're nasty) is that we set up the coroutines and then... Immediately await on them.

It's like... We're halfway there. So close. So close to actually taking advantage of concurrent programming. And yes, letting the event loop get in there instead of blocking hard on a main thread is a good thing and a strict improvement in circumstances where it matters.

But I do think sometimes about all the code I've seen where there are three network requests to three separate services that are totally independent of each other and the code is just... Eating the cost of "fully resolve request 1, fully resolve request 2, fully resolve request 3." I do wonder, sometimes, how many people think of these tools as concurrency and not just "the magic pixie-dust syntax I have to use to make half my functions the right color to be called from my other functions."

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.fixermark.com/users/mark/statuses/116065088717110227 on your instance and quote it. (Note that quoting is not supported in Mastodon.)