摘要:
原文: https://www.bbsmax.com/A/n2d99QxBdD/ #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #inc 阅读全文
posted @ 2021-05-12 13:47
立志做一个好的程序员
阅读(173)
评论(0)
推荐(0)
摘要:
golang 中channel 即使已经关闭了, 仍然可以将channel中的数据读出来, 并不会报错。 一般的写法: data, ok := <- chan, 只有当channel无数据,且channel被close了,才会返回ok=false。 package main import ( "co 阅读全文
posted @ 2021-05-12 10:39
立志做一个好的程序员
阅读(5094)
评论(0)
推荐(0)

浙公网安备 33010602011771号