当前位置:网站首页>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 .
边栏推荐
- CTS test steps (Casio cts200 test)
- 【FiddlerTX插件】使用Fiddler抓包腾讯课堂视频下载(抓不到包解决方案)
- [ManageEngine] value brought by Siem to enterprises
- yuv422转rgb(422sp转420p)
- Achieve accurate positioning based on Tencent map, and realize the attendance punch function of wechat applet
- 黑盒(功能)测试基本方法
- sqlx库使用
- Blood spitting finishing nanny level series tutorial - playing Fiddler bag capturing tutorial (7) - Fiddler status panel -quickexec command line
- IEC61131 address representation
- 使用oap切面导致controller被重复调用
猜你喜欢

Detailed explanation of Ag search tool parameters

Test cases and defect report templates

Pycharm跑程序时自动进入测试模式

SSH private key realizes login to remote target server

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

Zero basic learning canoe panel (17) -- panel CAPL function

Sentinel vs Hystrix 限流对比,到底怎么选?

JMeter distributed pressure measurement

Pychart automatically enters the test mode when running the program
What's special about Huawei's innovative solutions to consolidate the foundation of ERP for small and medium-sized enterprises?
随机推荐
cuda_ error_ out_ of_ Memory (out of memory)
Matlab---eeglab check EEG signal
测试用例和缺陷报告模板
CTS test steps (Casio cts200 test)
MySQL master-slave replication data synchronization, summary of common problems
Rent two or three things
npm 模块 移除_【已解决】npm卸载模块后该模块并没有从package.json中去掉[通俗易懂]
开源协议是否具有法律效力?
zigbee物联网开发平台(工业物联网)
Explain the principle of MySQL master-slave replication in detail
腾讯云数据库的可信可控之路
Cesium polygon gradient texture (canvas)
Using the OAP aspect causes the controller to be called repeatedly
Cesium 多边形渐变色纹理(Canvas)
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
The onnx model is exported as a TRT model
YUV422 to RGB (422sp to 420p)
[ManageEngine] value brought by Siem to enterprises
Database SQL statement exercise "suggestions collection"