▲ | gpderetta 5 days ago | ||||||||||||||||
By that definition, pthread is also async. If everything is async, then the word loses all meanings. Async is really about the surface syntax and ergonomics, not the implementation. | |||||||||||||||||
▲ | zbentley 4 days ago | parent [-] | ||||||||||||||||
Eh, not really. Async (in this semantic context) is generally about cooperative concurrency and also often about concurrent or multiplexed I/O. Pthreads aren't async by those definitions, though you can run async code within a given pthread as usual. Goroutines are an unusual case, in that they don't have cooperative concurrency--they're pre-emptive--but the Go runtime does perform I/O using concurrent multiplexers under the hood. So goroutines are kind of both: computation execution and code semantics look like pthreads, but I/O operations look like NodeJS on the backend. Now, I'm not sure what "async runtime" means in the GP. If they're referring to I/O multiplexers, then they should say that. If they're referring to something else, then I'm not familiar with other uses of that term that would accurately apply to Golang. | |||||||||||||||||
|