[concurrency-interest] Special Conditions and PriorityBlockingQueue
Doug Lea
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?
No.
> 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.
-Doug
More information about the Concurrency-interest
mailing list