Being Synchronous and OutOfMemory errors

So, I started to wonder why I only ever got 4 pages of urls whenever I looked at blogs with a lot of links on them.

Looking at the API for ArrayList reveals that it can go a bit funny when accessed by multiple threads that aren’t synchronous and you can either put the arraylist in a collections thingy to deal with it, or make the threads synchronous.

Making the threads synchronous gives and OutOfMemory error.

So it looks like I’m going to have a stab at putting the arraylist in whatever that collections thing was.

Leave a Reply