Skip to content

Commit 8decc14

Browse files
committed
Add BufferedChannelQueue.IsClosed()
1 parent 7e7186a commit 8decc14

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

queue.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,12 @@ func (q *BufferedChannelQueue[T]) SetFreeNodeHookPoolIntervalDuration(duration t
600600
return q
601601
}
602602

603-
// Close Close the Handler
603+
// IsClosed Is the BufferedChannelQueue closed
604+
func (q *BufferedChannelQueue[T]) IsClosed() bool {
605+
return q.isClosed.Get()
606+
}
607+
608+
// Close Close the BufferedChannelQueue
604609
func (q *BufferedChannelQueue[T]) Close() {
605610
q.lock.Lock()
606611
defer q.lock.Unlock()

0 commit comments

Comments
 (0)