That's a very strange symptom you describe. What does it have to do with I/O? Do you mean blocking in the sense that threads block when they try to enter a synchronized block or method, and can't, because they can't acquire the lock? Probably not, but that's what block usually means. Or do you just mean that your program spends too much time executing this method? That's surprising to me. Are you sure the problem is really with the iterator() method, and not in other methods called on the Iterator, like hasNext() or next()?
Joined: Feb 21, 2009
Mike, you're right.
I was just miss interpreting the profiler's results, but in re-examining it, it lead my to the question:
Is the new keyword synchronized, in the sense that multiple threads can't instantiate data structures simultaneously?