commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <...@apache.org>
Subject Re: [SUBMIT][Collections] Buffer stuff from Avalon
Date Thu, 27 Jun 2002 20:34:07 GMT
On Thu, 27 Jun 2002, Stephen Colebourne wrote:
> In the synchronizedBuffer implementation, the iterator() method should
> probably NOT be synchronized. The equivalent in java.util.Collections isn't
> and has a suitable comment instead.

I've always thought it was weird that the interator was unsynchronized.  
There's no reason each method on the iterator can't synchronize on the 
appropriate object to ensure consistency in a multi-threaded 
environment.  But, alas, Sun decided against it and just added a 
comment.  I haven't had a chance to look at what Paul put together, but 
I'm inclined to agree with Stephen here that we should behave similarly 
to java.util.Collections.synchronizedFoo(). 

> Also, should BoundedFifo be named BoundedFifoBuffer? and the same with
> Unbounded? If not, then the naming proposal needs a minor alteration. (and
> it should probably be voted on again)

Speaking of the naming proposal, have you had a chance to write 
something up?  I'm fairly certain I will have time this weekend, but 
don't want to duplicate effort if you've already gotten something put 
together that you just haven't finished/submitted yet.

regards,
michael


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message