[concurrency-interest] Special Conditions and PriorityBlockingQueue
dl at cs.oswego.edu
Mon Sep 25 13:15:50 EDT 2006
David Walend wrote:
> Is there a way to remove a Condition once Lock.newCondition() has
> been called?
> If not, how much overhead does the Condition take if
> it's never .signal()ed?
Not much -- when there are no waiters, Conditions just
maintain a few bookkeeping fields.
And they are GCable once unreferenced.
And they are also pretty cheap to construct.
I don't recall anyone ever exploiting all this to build
something with lots of dynamically created Conditions, but
I can't think of any reason not to try.
More information about the Concurrency-interest