I'm writing a game in Java where each game object has a number of properties, but these can all be changed in one of two ways:
- Every second, a tick runs which may automatically cause a change.
- Users can send a request to the server and make a modification themselves.
Should I lock the Object while the tick is running, or is this not beneficial? I was just concerned, for example, if the user made a change to an object while the tick was deleting it.