• atkdef@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      25 days ago

      True, and that’s exactly why I said parallelism.

      Concurrency without parallelism is just like Python/JS, a single thread drives all the coroutines, and it’s the easier one, as the runtime doesn’t really need to lock.

      GO on the other hand has parallelism. It maps goroutines to a thread pool, which requires locking, making things more complicated.

      This is also why Rust has two types of reference counting, Rc and Arc.