From 7146a67529f0096ecfd6c365786d3817d6d26d8a Mon Sep 17 00:00:00 2001 From: zhangxin Date: Thu, 19 Oct 2023 17:24:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/channel/ReleaseTask.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/models/channel/ReleaseTask.go b/models/channel/ReleaseTask.go index 78e1ec9..9a2eac5 100644 --- a/models/channel/ReleaseTask.go +++ b/models/channel/ReleaseTask.go @@ -6,7 +6,7 @@ import ( ) type TaskChannel struct { - name string + name string c chan interface{} closed bool mutex sync.Mutex @@ -14,7 +14,7 @@ type TaskChannel struct { func NewTaskChannel(name string) *TaskChannel { return &TaskChannel{ - c: make(chan interface{}, 100), + c: make(chan interface{}, 200), name: name, } } @@ -54,7 +54,7 @@ func (c *TaskChannel) Read() (data interface{}, ok bool, err error) { return } c.mutex.Unlock() - data, ok = <- c.c + data, ok = <-c.c return } @@ -68,4 +68,4 @@ func (c *TaskChannel) ResetChannel() (err error) { c.closed = false c.c = make(chan interface{}, 50) return -} \ No newline at end of file +}