Maven (famous)@lemmy.world to Programmer Humor@lemmy.ml · 9 months agoSTOP DOING ASYNClemmy.worldimagemessage-square63fedilinkarrow-up1716arrow-down139
arrow-up1677arrow-down1imageSTOP DOING ASYNClemmy.worldMaven (famous)@lemmy.world to Programmer Humor@lemmy.ml · 9 months agomessage-square63fedilink
minus-squareLmaydev@programming.devlinkfedilinkarrow-up3·9 months agoYou aren’t slowing down anything. If you didn’t use async that thread would be blocked. You’d need a thread per request even though they are sat doing nothing while waiting for responses. Instead when you hit an await that thread is freed for other work and when the wait is over the rest of the code is scheduled to run.
You aren’t slowing down anything. If you didn’t use async that thread would be blocked.
You’d need a thread per request even though they are sat doing nothing while waiting for responses.
Instead when you hit an await that thread is freed for other work and when the wait is over the rest of the code is scheduled to run.