avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: DefaultQueue not really threadsafe?
Date Mon, 04 Mar 2002 17:56:47 GMT
Peter Royal wrote:
> I've been using the DefaultQueue from Excalibur 4.1 in a small pipeline-based 
> project here. Although the javadocs state that its thread safe, I think 
> there's a bug somewhere. Check out these numbers:
> 
> Default queue:
> 
> Statistics:
>         Source: [read: 21196]
>         Connector: [read: 4868, write: 4868]
>         Destination: [write: 3871]
> 
> Statistics:
>         Source: [read: 21196]
>         Connector: [read: 4868, write: 4867]
>         Destination: [write: 3870]
> 
> Statistics:
>         Source: [read: 21196]
>         Connector: [read: 4868, write: 4868]
>         Destination: [write: 2846]
> 
> Statistics:
>         Source: [read: 21196]
>         Connector: [read: 5062, write: 5062]
>         Destination: [write: 3040]
> 
> Statistics:
>         Source: [read: 21196]
>         Connector: [read: 9159, write: 9159]
>         Destination: [write: 5088]
> 
> Statistics:
>         Source: [read: 21196]
>         Connector: [read: 13061, write: 13061]
>         Destination: [write: 8990]
> 
> LinkedListQueue (attached):
> 
> Statistics:
>         Source: [read: 21196]
>         Connector: [read: 21196, write: 21195]
>         Destination: [write: 21195]
> 
> The off-by-one between the read/write in the connector is due to an element 
> that doesn't pass it. That element doesn't make it to the connector each time!
> 
> My setup is that I have 3 threads going, with a queue between each (2 
> queues). There is a sizeable number of elements being dropped in each stage. 
> 
> The LinkedListQueue is definitly much slower, ~6min versus ~1m for the 
> DefaultQueue.
> 
> I'm curious as to other's experiences with the DefaultQueue in a threaded 
> environment.
> -pete


:/

What did you use to produce those results?  I am interested in anything
that reproduces errors consistently.  That is perfect for regression
testing.

Also, I would like to know what you are expecting your results to be
in the above list?

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message