Should I acquire a lock on Properties first before looping setProperety?
问题 The java class Properties is a thread-safe Class as per it's documentation: This class is thread-safe: multiple threads can share a single Properties object without the need for external synchronization. Because of that reason, I have the habit of maintaining my Properties in a HashMap implementation of Map , which is not thread-safe, but much more lightweight. More specifically, implementing thread-safety requires additional locking mechanisms, which will have an impact on performance. I can