Browse Source

格式化代码

develop
zhangxin 1 year ago
parent
commit
7146a67529
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      models/channel/ReleaseTask.go

+ 4
- 4
models/channel/ReleaseTask.go View File

@ -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
}
}

Loading…
Cancel
Save