• @qqq@lemmy.world
    link
    fedilink
    English
    38
    edit-2
    9 months ago

    Async features in almost all popular languages are a single thread running an event loop (Go being an exception there I believe). Multi threading is still quite difficult to get right if the task isn’t trivially parallelizable.

    • @brian@programming.dev
      link
      fedilink
      English
      29 months ago

      A lot of languages have an asunc/await facade for tasks run on a background thread for result (c#, clj, py, etc), but it’s certainly not the default anywhere, and go most goroutines(?)/other csp implementations are probably going to be yielding for some io most of the time at the bottom anyway

      • @qqq@lemmy.world
        link
        fedilink
        English
        19 months ago

        Yes I’m mostly familiar with this in Kotlin. Sometimes this is kinda a footgun because you’re writing multi threaded code without explicitly doing so.