• psivchaz@reddthat.com
    link
    fedilink
    arrow-up
    10
    ·
    il y a 4 mois

    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.

    • Vent@lemm.ee
      link
      fedilink
      arrow-up
      4
      ·
      il y a 4 mois

      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.

    • Luvon@beehaw.org
      link
      fedilink
      arrow-up
      4
      ·
      il y a 4 mois

      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.