controlp5
controlp5 copied to clipboard
Refactor for ControllerGroup + synchronized
- I wasn't expecting almost 1000 lines of code, but I've taken the challenge anyways.
- Placed localized
synchronized ()not only for those 2 Vector containers from controllers field, but also for the 2 ArrayList in ControllerGroup class. - Mostly for all sections doing iteration on them, but also when their size() changes.
- Prepended
@Overridefor all inherited methods in ControllerGroup class. - Prepended
finalfor all fields which didn't seem they would be re-assigned. - Lotsa further cleanups I can't remember I did. :P
Hi @GoToLoop thank you for looking into this however I wont include your suggestions or fix the issue after I have reviewed and evaluated the concurrency issues. I hope you don't mind I close your pull requests.