On Tue, 1 May 2001, James Strachan wrote:

> > How about merging "Object removeNoWait()" into "Object remove(long
> > timeout)"  where removeNoWait()==remove(0) ???
> 
> Good idea.
> 
> Though on further reflection the remove(long timeout) method throws
> exceptions:-
> 
>     public Object remove(long timeout) throws InterruptedException,
> TimeoutException;
> 
> So I'd prefer to have a helper method for non-blocking access,
> removeNoWait() that avoids having to catch wait() related exceptions. The
> method would also be a tad quicker...
> 
>     public synchronized Object removeNoWait() {
>             return queue.isEmpty() ? null : queue.removeFirst();
>     }
> 

Sounds good.

> BTW is there much code out there already using the threading package or is
> it still in the early days of development? Or to put that another way, its
> not a big deal to change the API now is it?
> 

I've got some old legacy code based on these classes (with JServ-based
package names), but none of that is relevant to this discussion.  Now is
definitely the time to make any changes we want, before any Jakarta code
uses it.

> I'd be happy to port the threading over to the new, proposed API if there
> are no objections.
> 

+1

> James
> 
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 

Reply via email to