Skip to content

performFunctionInCocosThread

pjc0247 edited this page Oct 23, 2014 · 1 revision

특정한 작업을 cocos스레드에서 실행하고자 할 때 사용

직접 queue에 작업을 넣어서 게임 스레드에서 빼와서 실행할 필요 X

/* another thread */
Director::getInstance()->getScheduler()->performFunctionInCocosThread(
  [](){
    /* cocos thread */
    printf("hello cocos thread\n");
  });

Clone this wiki locally