What problems might I run into in a program with multiple threads? : <p>Let's say I have two threads that both have access to the same gameWorld instance. The gameWorld has a List and the threads can change affect the entities with the method doAction(Action action, Map values). Each entity has a Map of values. Depending on the action and values put into the doAction method, the entities will be changed in different ways. </p>

<p>Assuming the doAction method is the only way the list of entities can be changed, are there any problems I might run into? What would happen if the same entity is being changed at the same time by both threads? Can multiple methods be running at the same time on one instance? If so, could the same method be running twice at the same time? </p>
