> 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();
    }

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'd be happy to port the threading over to the new, proposed API if there
are no objections.

James



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

Reply via email to