you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 3 months 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.

  • source
  • parent