But coroutines are not threads right? Multiple coroutines can run on the same thread isnt it?
I find it confusing when coroutines are interchanged between concurrency and parallelism.
I find it confusing when coroutines are interchanged between concurrency and parallelism.
Lets say there's one core, or "hardware thread". Then the scheduler has no choice but to stick them all on the same thread. They are running concurrently but not in parallel.
With more cores, Go can schedule them to run in parallel.
Rob Pike has a great talk on YouTube titled something like "Concurrency is not parallelism" on this exact thing.
"Concurrency is not parallelism."
> Video: https://www.youtube.com/watch?v=PAAkCSZUG1c&t=3m42s