Let's say I'm making a game where the screen is updates as often as possible within the frame-rate limit, but objects are only updated on a game-tick clock. How would I render complex objects without risking concurrent modification? For instance, if I needed the rendering engine to access detailed information about class objects to make graphical decisions, while those objects may be getting altered simultaneously by the game engine.
I would imagine making a deep copy of the objects prior to rendering would work, but wouldn't the same problem happen during copying? I would assume that editing an array list while it's being copied piece by piece would cause issues. It's times like these that I assume there is some industry standard that I am just not aware of.
This is a complicated problem but I will try to give you few pointer that I have found myself while dealing with this problem. First the problems with arrays and lists. What I have found useful is to generate a new list based on the list you use to hold the object. That way you only have to be careful about editing the list when you create a new list. The list created can be discarded once your are done with it. Also avoid removing item from the list or change position of them in the list if you can. This makes it that much easier to introduce concurrency problem.
Now to the render problem. Assuming you will only have one thread rendering at a time. I found it useful to create a object that keeps changes and does the actual change at the end or beginning of each render cycle that way you can change a object at any time but the changes won't have effect until next render cycle.