调整延迟队列的代码注释
This commit is contained in:
parent
ed4289d224
commit
94c82b2df0
@ -18,7 +18,7 @@ func (q *DelayLkQueue[T]) ContinuousDequeue(notify ...chan T) {
|
|||||||
for {
|
for {
|
||||||
value, ok := q.Dequeue()
|
value, ok := q.Dequeue()
|
||||||
if !ok {
|
if !ok {
|
||||||
time.Sleep(time.Millisecond) // 自旋
|
time.Sleep(time.Millisecond) // 队列为空,休眠1毫秒
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for _, n := range notify {
|
for _, n := range notify {
|
||||||
|
Loading…
Reference in New Issue
Block a user