Empty returns a bool indicating if this bool is empty.
()
| 309 | |
| 310 | // Empty returns a bool indicating if this bool is empty. |
| 311 | func (q *Queue) Empty() bool { |
| 312 | q.lock.Lock() |
| 313 | defer q.lock.Unlock() |
| 314 | |
| 315 | return len(q.items) == 0 |
| 316 | } |
| 317 | |
| 318 | // Len returns the number of items in this queue. |
| 319 | func (q *Queue) Len() int64 { |