mirror of
https://github.com/xxjwxc/public.git
synced 2025-09-26 20:01:19 +08:00
new
This commit is contained in:
@@ -151,6 +151,11 @@ func (q *MyQueue) Close() {
|
||||
}
|
||||
}
|
||||
|
||||
// IsClose check is closed
|
||||
func (q *MyQueue) IsClose() bool {
|
||||
return q.closed
|
||||
}
|
||||
|
||||
//Wait 等待队列消费完成
|
||||
func (q *MyQueue) Wait() {
|
||||
for {
|
||||
|
@@ -110,6 +110,7 @@ func TestTimeout(t *testing.T) {
|
||||
for i := 0; i < 10; i++ { //开启20个请求
|
||||
time.Sleep(1 * time.Second)
|
||||
que.Push(i)
|
||||
|
||||
}
|
||||
}()
|
||||
|
||||
|
Reference in New Issue
Block a user