From 6f0dd4955d82aa1d3062f86eef7b17dc1a099b06 Mon Sep 17 00:00:00 2001 From: fantasticbin Date: Tue, 3 Dec 2024 10:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E8=BF=9F=E6=97=A0=E9=94=81=E9=98=9F?= =?UTF-8?q?=E5=88=97=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lock_free/delay_queue_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lock_free/delay_queue_test.go b/lock_free/delay_queue_test.go index 0d91329..0bce92e 100644 --- a/lock_free/delay_queue_test.go +++ b/lock_free/delay_queue_test.go @@ -19,14 +19,15 @@ func TestDelayLkQueue(t *testing.T) { q.DelayEnqueue(c.value, c.duration) } - notidy := make(chan int) + notify := make(chan int) go func() { - for data := range notidy { + for data := range notify { t.Log(data) t.Log(time.Now().Unix()) } }() - go q.ContinuousDequeue(notidy) + go q.ContinuousDequeue(notify) time.Sleep(time.Second * 5) + close(notify) }