4 ms·
Aren't goroutines by their nature asynchronous? Am I misunderstanding what you mean by 'async'?
by all2 1y ago
Aren't goroutines by their nature asynchronous? Am I misunderstanding what you mean by 'async'?
- OutOfHere 1y agoAsynchronous is a programming style; it does NOT apply to Go. The goroutines run in parallel. Also, don't use complicated words when simple words will do.
- all2 1y agoAsynchronous is a programming style; it does NOT apply to Go. Ok, good to know. I guess I jammed threading and async into the same slot in my brain. Also, don't use complicated words when simple words will do. I'm not sure what you mean by this in relation to my above comment.
- aforwardslash 1y agoIn golang, there is no guarantee that goroutines will run in parallel; also, it is quite common to use channels as means of synchronization of results, akin to common async programming patterns.
- OutOfHere 1y ago> In golang, there is no guarantee that goroutines will run in parallel; That's not specific to Go lang. Most of the constraints you're thinking of apply to all parallel programming languages. It goes with the territory. All parallel programming languages impose certain flavors of their management of parallelism.
- sa46 1y agoGo is certainly capable of async programming. https://en.wikipedia.org/wiki/Asynchrony_(computer_programming) https://en.wikipedia.org/wiki/Asynchrony_(computer_programmi... > The goroutines run in parallel. Also, don't use complicated words when simple words will do. That’s not called for, especially since you’re wrong.