commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject RE: [collections] BoundedBuffer
Date Fri, 11 Nov 2005 23:18:50 GMT
That's the way I have it now.  I thought that'd be more appropriate.  The
TimeoutBuffer does the opposite, though.  If someone's going to use a
TimeoutBuffer, then they will want to wait for some period of time.
Otherwise, they'd just use the enclosed Buffer which would throw a
BufferUnderflowException immediately.

-----Original Message-----
From: Sandy McArthur [mailto:sandymac@gmail.com] 
Sent: Friday, November 11, 2005 6:12 PM
To: Jakarta Commons Developers List
Subject: Re: [collections] BoundedBuffer

On 11/11/05, James Carman <james@carmanconsulting.com> wrote:
> I'm working on the BoundedBuffer implementation right now.  But, I've got
a
> question for you folks.  What do you think a reasonable default would be
for
> the timeout value?  Should it wait forever by default (like TimeoutBuffer
> does) or should it immediately throw a BufferOverflowException?

Unless the class is named something like WaitBuffer then it should
fail immediately by default. A programmer who isn't paying attention
would be confused why their program just seems to hang if the default
behavior was to block for a while.

--
Sandy McArthur

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


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


Mime
View raw message