[concurrency-interest] Questions about ArrayDeque
josh at bloch.us
Fri Jul 21 19:11:11 EDT 2006
Yes, I agree that the documentation could be improved.
On 7/21/06, Rémi Forax <forax at univ-mlv.fr> wrote:
> Joshua Bloch wrote:
> > Rémi,
> > On 7/21/06, Rémi Forax <forax at univ-mlv.fr> wrote:
> >> To josh, perhaps i am tired, but for me, allocateElements() always
> >> allocates
> >> a power of two size.
> > Fair enough...
> >> The other invariant is that head and tail must be
> >> different
> >> if the size is not empty, it seems to be the case.
> >> So i continue to think that this implementation is valid.
> > No. Sun decided to make all collection "copy-constructors" robust to
> > concurrent modification of the argument. This is wise, in light of
> > the fact that we now have true concurrent collections that cannot be
> > globally locked. So Martin's objection is valid.
> sorry about my answer to martin, it was stupid.
> ok, i understand now.
> perhaps the third paragraph of java.util.Collection doc
> can contain a line saying that copy constructor must rely on
> the iterator of the collection taken as parameter.
> > Josh
> Rémi Forax
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
More information about the Concurrency-interest