cocos2d/cocos2d-iphone — pull request #278 by tchaikov (2013-01-02 10:22:46+00:00)
Title: Protect CCConfiguration accessor with sync lock

i ran into a race condition where two invocations of [CCConfiguration init] were running in two threads. because i was calling [CCGLView viewWithFrame: ...] and using CCFileUtils in a background thread. the later tries to use [CCConfiguration sharedConfiguration]. but CCConfiguration's singleton initializer is not protected by a lock, so there is chance that both thread try to create an instance of it.