摘要: 从源码解析Go exec timeout 实现机制 1. 背景 环境:golang 1.9,drawn 测试使用golang exec 执行命令,并配置过期时间,测试脚本如下。 现象:执行脚本后,到超时时间后并为超时退出,反而阻塞住了 func TestExecWithTimeout(t *testing.T) { ctx, cancel := co 阅读全文
posted @ 2023-03-29 00:34 JonPan 阅读(1250) 评论(0) 推荐(1) 编辑