Commit 2b1f0890 authored by Vladimir Barsukov's avatar Vladimir Barsukov
Browse files

zgo

parent edf82d61
......@@ -62,12 +62,14 @@ func (q *ZQ) RemoveWorker() {
q.AddWorker(-1)
}
func (q *ZQ) AddJob(a any) {
func (q *ZQ) AddJob(a any) *ZQ {
q.JobsWg.Inc()
go func() {
q.jobs <- a
}()
return q
}
func (q *ZQ) Wait() {
......
......@@ -72,3 +72,7 @@ func (q *ZQuit) ZQuitMiddleware(c *gin.Context) {
c.Next()
}
func (q *ZQuit) Shutdown() {
q.isQuit = true
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment