Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 719 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 719 Bytes

SafeStop

safe_stop是基于sync.WaitGroup抽象的服务安全退出模块

License GoDoc Go Report Card

特性

  • 支持多个任务间隔指定时间运行
  • 支持多实例部署情况下,避免并发运行

安装

go get github.com/ant-libs-go/safe_stop

快速开始

// lock
safe_stop.Lock(1)

// safe exit
safe_stop.Wait()