When I read the materials for study, I saw a texture asynchronous loading, so I thought it was quite useful to share the specific principles and usage, later, you can modify and transplant the files based on the browser features. Void CCTextureCache: addImageAsync (const char * path, CCObject * target, SEL_CallFuncO selector) {CCAssert (path! = NULL, "TextureCache: fileimage MUST not be NULL"); CCTexture2D * texture = NULL; // optimized std: string pathKey = path; CCFileUtils: ccRemoveHDSuffixFromFile (pathKey ); pathKey = CCFileUtils: fullPathFromRelativePath (pathKey. c_str (); texture = m_pTextures-& gt; objectForKey (pathKey); // check whether the texture has been loaded Based on the pathkey. If yes, do not reload std :: string fullpath = pathKey; if (texture! = NULL) {if (target & amp; selector) {(target-& gt; * selector) (texture) ;}return ;} if (target) {target-& gt; retain () ;}// lazy initstatic bool firstRun = true; if (firstRun) {s_pAsyncStructQueue = new queue & lt; asyncstruct & gt ;(); s_pImageQueue = new queue & lt; imageinfo & gt; (); pthread_mutex_init (& amp; s_asyncStructQueueMutex, NULL); sem_init (& amp; s_sem, 0, 0 ); pthread_mutex_init (& amp; s_ImageInfoMutex, NULL); pthread_create (& amp; s_loadingThread, NULL, loadImage, NULL); // create a thread for loading images in the background // create a scheduling queue, CCScheduler: sharedschedtor ()-& amp; gt; scheduleSelector (schedule_selector (CCTextureCache: addImageAsyncCallBack), this, 0, false ); need_quit = false; firstRun = false;} // generate AsyncStruct * data = new AsyncStruct (); data-& amp; gt; filename = fullpath. c_str (); data-& amp; gt; target = target; dat A-& amp; gt; selector = selector; // Add to queue asynchronous structure pthread_mutex_lock (& amp; s_asyncStructQueueMutex); s_pAsyncStructQueue-& amp; gt; push (data ); // put the image to be loaded into the queue pthread_mutex_unlock (& amp; s_asyncStructQueueMutex); sem_post (& amp; s_sem);} the process can be seen from the code analysis above: 1. create a thread for loading in the background. 2. put the image to be loaded into the queue. callback Function setting is used to convert the loaded image into a texture. It is called by CCTimer: update. 4. After processing the texture conversion, the addImageAsyncCallBack function also calls the SEL_CallFuncO selector passed in by addImageAsync to implement the processing after the user loads the image texture. Example: CCTextureCache: sharedTextureCache ()-& amp; gt; addImageAsync ("Images/blocks.png", this, callfuncO_selector (TextureCacheTest: loadingCallBack )); the loadingCallBack function allows users to process results after asynchronous loading, such as initializing a sprite and pasting the texture.