You are viewing a single thread.
View all comments View context
9 points

I like async but dislike await. I spend entirely too much time on everything I build trying to maximize how much I can do in parallel because I find it tremendously satisfying.

permalink
report
parent
reply
4 points

You probably already know this, or are talking about another language, but JavaScript is inherently single threaded, so unless you’re running blocking I/O in parallel, you won’t actually see any performance boost. Service workers get their own thread though.

permalink
report
parent
reply
1 point

Then Promise.all is for you!

permalink
report
parent
reply
1 point

TaskGroup in Python is great

permalink
report
parent
reply
4 points

Await is usually there either because the performance doesn’t matter and the legibility is much higher with it, and/or because there are a series of asynchronous actions that depend on each other and await lets you write them as if they are sync because related to each other they are.

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 6.7K

    Monthly active users

  • 796

    Posts

  • 7.3K

    Comments

Community moderators