"ataylor" wrote : anonymous wrote : In most cases, refs are only ever removed
from the head of the queue, so you can just go back to the beginning of the queue.
That's the 99% case and is pretty trivial.
|
| If you've iterated over 5 messages and then one is removed you don't go back
to the beginning, you go to 4 which is the last message you looked at.
|
My point was, that if you are on message 5, and message gets removed from the head which
is the 99% case, then it shouldn't affect you. There is no need to go anywhere.
The only case that should affect the iterator is when the current node disappears in which
case you can either iterate up from the beginning, or the queue can trap the delete all
the call the iterator with the next node.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181519#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...