Browse Source

queue clear

marion 4 years ago
parent
commit
f16b8090d4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      utils/queue/queue_clear.go

+ 1 - 1
utils/queue/queue_clear.go

@@ -17,10 +17,10 @@ func (i *Clear) Clean(queue chan interface{}) {
 
 	for {
 		if len(queue) == 0 {
-			time.Sleep(1 * time.Millisecond) // set a little gap between Clean() and clear.Working() off
 			i.set(false)
 			break
 		}
+		time.Sleep(1 * time.Millisecond) // set a little gap between every loop and between Clean() and clear.Working() off
 	}
 }