Returns false if the queue is empty i. e function used to identify whether the queue is empty
()
| 124 | //Returns false if the queue is empty |
| 125 | //i. e function used to identify whether the queue is empty |
| 126 | func (q *Queue) IsEmpty() bool { |
| 127 | q.lock.Lock() |
| 128 | defer q.lock.Unlock() |
| 129 | |
| 130 | if q == nil { |
| 131 | return false |
| 132 | } |
| 133 | if q.count == 0 { |
| 134 | return true |
| 135 | } |
| 136 | return false |
| 137 | } |
| 138 | |
| 139 | func main() { |
| 140 |
no outgoing calls
no test coverage detected