[concurrency-interest] PriorityBlockingQueue question
tim at peierls.net
Tue Sep 26 10:35:32 EDT 2006
On 9/25/06, David Walend <david at walend.net> wrote:
> I've got something coded up that should work, but isn't very
> satisfying. I did find a way to signal just the conditions that
> matter, but take() and poll(timeout) still have to scan back to find
> the right message.
> I know there's still things to clean up, but I'm still trying to
> convince myself this is a good approach.
I'm trying to understand the code first. How can take() ever work with this
while(message == null)
message is a local variable, so how can you wait for it to become non-null?
I'd like a way to clean up the scanForMatchingMessages() st/ it isn't
> scanning. Any ideas?
No ideas for this -- I'm thinking about the other approach.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest