Is ArrayList thread-safe?
807589Dec 15 2008 — edited Dec 15 2008Hello,
I'm working on a quite big game. I'd like to use 2 threads for it(one for game input and other one for repainting screen).
the "input" thread can remove or add elements to ArrayList,
and the "repainting" thread reads that elements.
I read that this may cause some problems when input thread changes the ArrayList when the repainting thread interator is reading them.
Should i use for this Vector(because it is thread-safe).
Thanks Juraj.