Thread safe apis (nsapplication's postevent and opengl's makecurrentcontext)