Skip to content

Conversation

@gammazero
Copy link
Contributor

The reason I am suggesting this change is because for many of my uses of queue, I remove an item in each iteration of a loop:

for q.Length() > 0 { x := q.Remove() ... 

Only in some cases (e.g. your channels) do I find a need to do a Peek() and remove separately.

@eapache
Copy link
Owner

eapache commented Aug 5, 2016

Looks great.

@eapache eapache merged commit 44cc805 into eapache:master Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants