altf4/RealTimeTactics — Issue #19: Locking and pointers
Author: altf4
Created: 2011-12-30 01:24:21+00:00
State: open

The playerList and matchList hash tables contain only pointers to objects. So that essentially means that we should be doing locking any time a match or player is accessed. Which is bad. Change the hash tables to contain actual object contents.

Then we can get a copy of the object and immediately unlock. If we want to submit that object back into the table, then you have to relock and go back and do it.