3 ms·
> Google’s Go is structured to simplify the work of making > code run “concurrently,” smoothing the way for > programmers to create and juggle portions
by weinzierl 12y ago
> Google’s Go is structured to simplify the work of making
> code run “concurrently,” smoothing the way for
> programmers to create and juggle portions of a program
> that execute simultaneously — and thus take full
> advantage of today’s multicore chips and multiprocessor
> machines.
It's a while since I last checked out Go but I thought Goroutines were coroutines and therefore confined to a single core. Does Go provide means for true concurrency nowadays?
- teraflop 12y agoGo has supported "true" concurrency (distributing goroutines across cores) since at least version 1.0, and probably earlier.
- cmelbye 12y agoParallelism is determined by an environment variable called GOMAXPROCS (or, set at runtime), which is the number of threads executing user-level Go code simultaneously. This includes goroutines. By default, GOMAXPROCS=1.