forked from p93542168/wheat-cache
This commit is contained in:
parent
f62a59b551
commit
ef4cbb0cee
|
@ -11,7 +11,7 @@ type ChannelX struct {
|
|||
sizeByte int64
|
||||
}
|
||||
|
||||
func MakeChannelX(length int) *ChannelX {
|
||||
func MakeChannelX(length int) structure.ChannelXInterface {
|
||||
return &ChannelX{
|
||||
channel: make(chan *structure.Value, length),
|
||||
sizeByte: 0,
|
||||
|
@ -58,7 +58,7 @@ func (c *ChannelX) Length() int {
|
|||
return len(c.channel)
|
||||
}
|
||||
|
||||
func (c *ChannelX) CLean() structure.UpdateLength {
|
||||
func (c *ChannelX) Clean() structure.UpdateLength {
|
||||
c.channel = make(chan *structure.Value, cap(c.channel))
|
||||
up := c.sizeByte
|
||||
c.sizeByte = 0
|
||||
|
|
Loading…
Reference in New Issue