edocevol / cogo-job

类似于Laravel Job的一次性、重复性任务的golang实现方案
3 stars 1 forks source link

The semaphore does not need to be checked with for #1

Open daheige opened 5 years ago

daheige commented 5 years ago

https://github.com/edocevol/cogo-job/blob/9151d06e5094ef292e36113b256386b1a27608e6/gowork.go#L79 you can single use select case,do this,where current task timeout,context will auto exit.