Paul King created GROOVY-11650:
----------------------------------
Summary: Create drain extension method for Queues
Key: GROOVY-11650
URL: https://issues.apache.org/jira/browse/GROOVY-11650
Project: Groovy
Issue Type: New Feature
Reporter: Paul King
Fix For: 5.x
The standard iterator for queues like PriorityQueue don't iterate according to
priority order. You have to use poll (or drainTo for blocking queues) to get
the elements in priority order. It would be useful to have a "drain()" or
"elements()" method to get a list of all the elements that successive calls to
poll would return. The intention would be that the queue was drained upon
completion of the call.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)