当前位置:网站首页>2022-07-18: what is the output of the following go language code? A:Groutine; B:Main; C:Goroutine; D:GoroutineMain。 package m
2022-07-18: what is the output of the following go language code? A:Groutine; B:Main; C:Goroutine; D:GoroutineMain。 package m
2022-07-25 21:24:00 【Fuda frame constructor daily question】
2022-07-18: following go What language code outputs ?A:Groutine;B:Main;C:Goroutine;D:GoroutineMain.
package main
import (
"fmt"
"time"
)
func main() {
ch := make(chan bool)
go func() {
<-ch
fmt.Print("Goroutine")
}()
time.Sleep(2 * time.Second)
close(ch)
time.Sleep(3 * time.Second)
fmt.Print("Main")
}answer 2022-07-18:
Answer selection D. close channel after ,<-ch Will return to .
边栏推荐
- ag 搜索工具参数详解
- Sum of two numbers and three numbers
- Experience sharing of system architecture designers preparing for the exam: from point to surface
- Golang language quickly get started to comprehensive practical notes (go language, beego framework, high concurrency chat room, crawler)
- Cesium polygon gradient texture (canvas)
- ONEFLOW V0.8.0 officially released
- Interviewer of large factory: how to quickly query a table with tens of millions of data?
- Use Navicat to connect to MySQL database through SSH channel (pro test is feasible)
- ES6---4个强大运算符(??、??=、?.、?:)
- Rent two or three things
猜你喜欢

零基础学习CANoe Panel(17)—— Panel CAPL Function

Pyqt5 use pyqtgraph to draw multiple y-value scatter plots

Airtest解决“自动装包”过程中需要输入密码的问题(同适用于随机弹框处理)

DDD的Go实战

How to solve the problem of high concurrency and large traffic with PHP

Canvas fill gradient

Qixin Jushi cloud spectrum new chapter | Haitai Fangyuan and Sichuan Unicom reach ecological strategic cooperation

The international summit osdi included Taobao system papers for the first time, and end cloud collaborative intelligence was recommended by the keynote speech of the conference

Interface testing tool restlet client
![[manageengine]itsm application in retail industry](/img/25/e8d9a320c5d4b1cf2e187b61180991.png)
[manageengine]itsm application in retail industry
随机推荐
Intel base instruction -- bnd
Pycharm跑程序时自动进入测试模式
day04_ array
Fusing and degrading Sentinel
Array of arm disassembly
Wokerman custom write log file
Explain the principle of MySQL master-slave replication in detail
IEC61131 address representation
Vivo official website app full model UI adaptation scheme
接口测试工具 restlet client
ES6 --- four powerful operators (?,? =,?.,?:)
476-82(322、64、2、46、62、114)
Differences between seaslog and monolog log systems, installation steps of seaslog [easy to understand]
CTS test steps (Casio cts200 test)
[FAQ] access the HMS core push service, and the server sends messages. Cause analysis and solutions of common error codes
数据库sql语句练习题「建议收藏」
SSH private key realizes login to remote target server
Focus on data | Haitai Fangyuan directly hits the construction idea of data security governance in the securities industry
Pyqt5 use pyqtgraph to draw multiple y-value scatter plots
图片怎么存储到数据库里「建议收藏」