I don't think that's a good idea since ArrayList is not thread-safe :)

http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html


*Note that this implementation is not synchronized.* If multiple threads
access an ArrayList instance concurrently, and at least one of the threads
modifies the list structurally, it *must* be synchronized externally. (A
structural modification is any operation that adds or deletes one or more
elements, or explicitly resizes the backing array; merely setting the value
of an element is not a structural modification.) This is typically
accomplished by synchronizing on some object that naturally encapsulates
the list. If no such object exists, the list should be "wrapped" using the
Collections.synchronizedList<http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList(java.util.List)>method.
This is best done at creation time, to prevent accidental
unsynchronized access to the list:

   List list = Collections.synchronizedList(new ArrayList(...));



On Thu, Jan 2, 2014 at 11:43 AM, eaglei22 <jchojnack...@gmail.com> wrote:

> I have temporarily fixed it by first loading the lines into a string
> ArrayList and just read from that list..
>
> I don't really see any latency issues, so maybe this can be considered a
> good alternative?
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/MultiThreading-issues-with-Wicket-tp4663325p4663389.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to