gpt4 book ai didi

concurrency - `Go is a concurrent lang` 是什么意思?

转载 作者:IT王子 更新时间:2023-10-29 00:49:23 30 4
gpt4 key购买 nike

Go is a concurrent lang 这是什么意思?

这是否意味着它是 C/C++/Java.. 的替代品?

最佳答案

A concurrent language是一种具有并发语言结构的语言。

Go is a concurrent language因为它有“goroutines”。

Concurrency

Go provides goroutines, small lightweight threads; the name alludes to coroutines. Goroutines are created with the go statement from anonymous or named functions.

Goroutines are executed in parallel with other goroutines, including their caller. They do not necessarily run in separate threads, but a group of goroutines are multiplexed onto multiple threads — execution control is moved between them by blocking them when sending or receiving messages over channels.

关于concurrency - `Go is a concurrent lang` 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4978274/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com