[concurrency-interest] PriorityBlockingQueue question

Kasper Nielsen kav at it.edu
Mon Sep 25 16:32:40 EDT 2006

David Walend wrote:
> I'm imitating the PriorityBlockingQueue code to add Conditions  
> dynamically.
> I ran across a line of code I don't understand. The member variable  
> lock is final. The offer() method sets up a final local variable  
> named lock, set to the same value. Nothing can change the final  
> (short of the hack used by Serialization). The Condition notEmpty and  
> the PriorityQueue q don't get the same treatment.
> Do I need to imitate that line of code, or can I skip it?

Take a look at the "[concurrency-interest] ThreadPoolExecutor implement 
question!" thread that was posted a couple of days ago.

- Kasper

More information about the Concurrency-interest mailing list