惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Hacker News
The Hacker News
D
Docker
GbyAI
GbyAI
Y
Y Combinator Blog
C
Check Point Blog
M
MIT News - Artificial intelligence
Martin Fowler
Martin Fowler
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Blog — PlanetScale
Blog — PlanetScale
P
Palo Alto Networks Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V
Vulnerabilities – Threatpost
I
InfoQ
Simon Willison's Weblog
Simon Willison's Weblog
博客园_首页
T
Threat Research - Cisco Blogs
J
Java Code Geeks
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
阮一峰的网络日志
阮一峰的网络日志
O
OpenAI News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
Forbes - Security
Forbes - Security
AWS News Blog
AWS News Blog
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
S
Security Affairs
H
Heimdal Security Blog
Engineering at Meta
Engineering at Meta
T
Troy Hunt's Blog
T
Tenable Blog
MongoDB | Blog
MongoDB | Blog
H
Hacker News: Front Page
IT之家
IT之家
N
News and Events Feed by Topic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
S
Secure Thoughts
U
Unit 42
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Last Watchdog
The Last Watchdog
S
Security @ Cisco Blogs
NISL@THU
NISL@THU
T
The Blog of Author Tim Ferriss

浩瀚星河 - 个人技术博客

工作中如何做好技术积累 wrk压测工具 千万级 Mysql 表结构变更实战 MySql主从复制 Go遍历时删除特定元素 Golang中的优雅关闭与退出 Github CI自动发版 git-filter-repo 清理敏感信息 初识mcp server 短视频的推荐算法 webhook是什么 GitLab Runner 使用与 CICD 全面指南 Go Zap实现日志双写和切割 canal安装与使用 kafka-go使用 go-elasticsearch使用指南 elasticsearch安装与使用 kratos中proto文件引入其他proto爆红 go中的defer 腾讯云发送短信 什么是勇敢 go中的方法提升 docker部署mysql中文乱码问题 10万行报表导出优化实战:从 OFFSET 到游标分页 不急于求成,才是最长远的成长 redis在go中的实践 go 反射 go timer定时器 go context学习之旅 go jwt和redis实现用户登录注册以及查询 go中的panic和recover channel实现简易eventbus channel之生产者消费者模型 缓冲区为 1 和无缓冲区的 channel 有什么区别 channel 基本概念 使用minio的go sdk上传文件 wire优雅的管理go项目
channel的select case控制语句
浩瀚星河 · 2025-08-05 · via 浩瀚星河 - 个人技术博客

`select case` 用于监听多个 channel 的就绪状态,只有当对应的读写操作**不阻塞**时才会执行。无缓冲通道需读写同时存在才就绪,有缓冲通道读需有值、写需未满。若多个 case 同时就绪,`select` 会**随机选择一个执行**,否则执行 `default`。配合 `time.After` 可实现超时控制,是并发中的常用模式。