File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Possible to have ConcurrentModificationException with multiple threads?

 
V Pinto
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

Given the following code


Given that at any time an external thread can call remMethod() will I ever get a ConcurrentModificationException regarding the iterator it? I made the current thread to get the lock over the hash object when iterating so, in my understanding, even if an external thread tries to run remMethod() while iterating, wont be possible to get such an exception... I'm missing something?

Regards,RG
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic