Permalink
Browse files

Try to squash a lot of threading bugs in Game:

- Make players and roundPlayers be sychronizedLists. Remove all synchronizations on those except while iterating. (Just to reduce code clutter, since the lists still do the same thing internally).
- Rework some other code to reduce locking complexity.
- In skipIdleJudge, apparently getJudge() can return null. I have seen an exception because of this, so I make it check for that. Not entirely sure how that would happen in the first place.
- DEADLOCK FIX: Move getPlayerForUser() call outside of synchronized (playedCards) block in getWhiteCards().
  • Loading branch information...
ajanata committed Mar 23, 2012
1 parent ca226ef commit 368e890c07d29e1b810821ac6f76c983227ab7c1
Showing with 142 additions and 141 deletions.
  1. +142 −141 src/net/socialgamer/cah/data/Game.java
Oops, something went wrong.

0 comments on commit 368e890

Please sign in to comment.