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

推荐订阅源

The Last Watchdog
The Last Watchdog
博客园_首页
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
美团技术团队
小众软件
小众软件
V
V2EX
博客园 - Franky
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Attack and Defense Labs
Attack and Defense Labs
S
Security Affairs
Simon Willison's Weblog
Simon Willison's Weblog
I
Intezer
T
The Exploit Database - CXSecurity.com
有赞技术团队
有赞技术团队
S
Schneier on Security
人人都是产品经理
人人都是产品经理
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
K
Kaspersky official blog
PCI Perspectives
PCI Perspectives
AI
AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客
O
OpenAI News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Register - Security
The Register - Security
V
Vulnerabilities – Threatpost
GbyAI
GbyAI
博客园 - 【当耐特】
C
Cisco Blogs
大猫的无限游戏
大猫的无限游戏
Help Net Security
Help Net Security
Google DeepMind News
Google DeepMind News
S
Securelist
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
L
LangChain Blog
SecWiki News
SecWiki News
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V2EX - 技术
V2EX - 技术
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
L
LINUX DO - 热门话题
Cisco Talos Blog
Cisco Talos Blog

浩瀚星河 - 个人技术博客

工作中如何做好技术积累 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` 可实现超时控制,是并发中的常用模式。