commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
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 [] 
Sent: Friday, November 11, 2005 6:12 PM
To: Jakarta Commons Developers List
Subject: Re: [collections] BoundedBuffer

On 11/11/05, James Carman <> wrote:
> I'm working on the BoundedBuffer implementation right now.  But, I've got
> question for you folks.  What do you think a reasonable default would be
> 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:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message