Skip to content

Commit c65a57a

Browse files
committed
chore(ringqueue): gc overhead
Signed-off-by: Bo-Yi.Wu <[email protected]>
1 parent 10c111b commit c65a57a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

consumer.go

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func (s *Consumer) Request() (core.QueuedMessage, error) {
8383
}
8484
s.Lock()
8585
data := s.taskQueue[s.head]
86+
s.taskQueue[s.head] = nil
8687
s.head = (s.head + 1) % len(s.taskQueue)
8788
s.count--
8889

0 commit comments

Comments
 (0)