diff --git a/util/queue.go b/util/queue.go index 82a4417a..f788ae51 100644 --- a/util/queue.go +++ b/util/queue.go @@ -30,6 +30,10 @@ func (self *Queue) Dequeue() (ret interface{}) { return } +func (self *Queue) Clear() { + self.list = self.list[0:0] +} + func NewQueue(size int) *Queue { return &Queue{