• Post Reply Bookmark Topic Watch Topic
  • New Topic

what concurrency issue may arise from this code?  RSS feed

 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi



What issue may arise from the code above in multithreaded env?
note that the class is guaranteed to only have 1 method and the first line of said method will always be instantiation of "map" instance variable.


thanks
 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends what is your requirement? Do you want to reinitialize the map each time the method is called? your map will be re-initialized each time method is called.
 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
forget it, of course it's gonna be a problem.
Sorry guys, apparently tequila before work is not such a good idea.
Again, sorry.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!