Why are we even talking about this.  Does someone really have a use case where 
they want to use the ListAppender in a multithreaded manner in a unit test?

Ralph

> On Sep 15, 2016, at 12:13 PM, Gary Gregory <garydgreg...@gmail.com> wrote:
> 
> I'm not sure why. Probably because we want our test code to be more like 
> production code since tests show _how_ to use Log4j for some people. So we 
> might as well do it in a way that is best. It seems that Java has a lot of 
> concurrent classes that are designed to work better that a brute-force 
> synchronous wrapper around a list. 
> 
> Gary
> 
> On Thu, Sep 15, 2016 at 2:44 AM, Mikael Ståldal <mikael.stal...@magine.com 
> <mailto:mikael.stal...@magine.com>> wrote:
> Why not a synchronized list? The performance might not be optimal, but 
> probably be OK for unit tests.
> 
> On Thu, Sep 8, 2016 at 10:34 PM, Gary Gregory <garydgreg...@gmail.com 
> <mailto:garydgreg...@gmail.com>> wrote:
> Should ListAppender use CopyOnWriteArray instead of ArrayList? Either all the 
> time or when using in aync tests?
> 
> Gary
> 
> -- 
> E-Mail: garydgreg...@gmail.com <mailto:garydgreg...@gmail.com> | 
> ggreg...@apache.org  <mailto:ggreg...@apache.org>
> Java Persistence with Hibernate, Second Edition 
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.stal...@magine.com <mailto:mikael.stal...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  
> <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. 
> If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not 
> copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.  
>  
> 
> 
> 
> -- 
> E-Mail: garydgreg...@gmail.com <mailto:garydgreg...@gmail.com> | 
> ggreg...@apache.org  <mailto:ggreg...@apache.org>
> Java Persistence with Hibernate, Second Edition 
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>

Reply via email to