How to notify main thread while receive network message?


#1

Hi all:

While receive network message, I’ll move/display/remove the sprites in scene. But cocos2d-x not allowed call graphic interfaces in other thread, so I need notify main thread to do this. How??

Eg: At android, we use new Handler(getMainThread()).post(new Runnable), then the Runnable will run in main thread. At Cocos2d-X, how could I make it ?

THX


#2

Have you found an answer yet? I am facing the same problem.