自护意识

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2021年4月8日

摘要: 优雅的结束golang程序 实现方式 使用sync.WaitGroup配合context.WithCancel即可优雅的关掉 ctx, cancel := context.WithCancel(context.Background()) var wg sync.WaitGroup signChan 阅读全文
posted @ 2021-04-08 17:35 自护意识 阅读(632) 评论(0) 推荐(0) 编辑