摘要:
原文: https://www.bbsmax.com/A/n2d99QxBdD/ #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #inc 阅读全文
摘要:
golang 中channel 即使已经关闭了, 仍然可以将channel中的数据读出来, 并不会报错。 一般的写法: data, ok := <- chan, 只有当channel无数据,且channel被close了,才会返回ok=false。 package main import ( "co 阅读全文