[concurrency-interest] PriorityBlockingQueue question
David Walend
david at walend.net
Wed Sep 27 08:28:06 EDT 2006
On Sep 26, 2006, at 10:35 AM, Tim Peierls wrote:
>
> I'm trying to understand the code first. How can take() ever work
> with this code:
>
> while(message == null)
> {
> condition.await();
> }
Arg. Missed a scan. Try
while(message == null)
{
condition.await();
message = scanForMatchingMessages
(messageSelector);
}
Thanks,
Dave
David Walend
david at walend.net
More information about the Concurrency-interest
mailing list