4 ms·
Wrong. Goroutines are not simply coroutines. GOMAXPROCS defaults to number of cores.
by quadcore 9y ago
Wrong. Goroutines are not simply coroutines.
GOMAXPROCS defaults to number of cores.
- tzahola 9y agoProve it. Prove it by replacing Sleep in your example with some number crunching, and show how it scales with the number of cores in your CPU.
- deleted 9y ago[deleted]
- gall0ws 9y agohttps://play.golang.org/p/o8odLCRqUMA https://play.golang.org/p/o8odLCRqUMA
- ta2384428 9y agohttps://imgur.com/a/DNpw3 https://imgur.com/a/DNpw3 Running the following code. https://play.golang.org/p/k_rRxNAyb0i https://play.golang.org/p/k_rRxNAyb0i I can assure you that go runs across all processors by default. https://docs.google.com/document/d/1At2Ls5_fhJQ59kDK2DFVhFu3g5mATSXqqV5QrxinasI/edit https://docs.google.com/document/d/1At2Ls5_fhJQ59kDK2DFVhFu3...
- grkvlt 9y agoThat's not what he's saying. He knows go can use all processors if GOMAXPROCS is set correctly, the argument seems to be that there will be race conditions just like any other threading, which seems pretty self evident to me: yes, multi-threaded code can have concurrency issues, film at 11...
- gameswithgo 9y agoDude you are wrong about this. Please stop.