directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: BaseThreadPool question
Date Tue, 18 Oct 2005 08:39:38 GMT
Trustin Lee <> a écrit :

> 2005/10/18, <>:
>> Trustin,
>> I have some questions for you:
>> - Is there a reason to use a Queue instead of (the less restrictive) List?
> We need a pop() operation. That's all for now. :)

Then a List would suit you as well (remove(0)), and suit me more.

> - If so, is there a reason to use a custom Queue instead of those from Java?
> First, java.util.Queue appeared in JDK 1.5. We support JDK 1.4 or above.

Sorry, I have been using Java 5.0 for almost a year now. I have even forgotten
the good old 1.4 days ;->

BTW, the Queue has same method names as java.util.Stack, while one is FIFO and
the other LIFO. This can be misleading.

If you hold on Queue, it could be interesting to implement same interface as
java.util.Queue to ease future migration.

> And the queues provided by JDK is less effecient than our circular queue
> implementation. There's no circular queue implementation in JDK 1.5 yet.
> Trustin



View raw message