github.com/weedge/lib@v0.0.0-20230424045628-a36dcc1d90e4/pool/workerpool/define.go (about) 1 package workerpool 2 3 import ( 4 "errors" 5 "time" 6 ) 7 8 const ( 9 WorkerPool_Stat_Uninitialized int32 = iota 10 WorkerPool_Stat_Start 11 WorkerPool_Stat_Running 12 WorkerPool_Stat_Stoping 13 WorkerPool_Stat_Stop 14 ) 15 16 const ( 17 DefaultTimeOut = 30 * time.Second 18 workerGoroutineLifeTime = 30 19 addWaitingTimeWhenStopPool = 30 20 ) 21 22 // 一些错误码 23 var ErrTimeout = errors.New("received timeout") 24 var ErrInterrupt = errors.New("receive interrupt")