Open owen200008 opened 7 years ago
Sorry, i am not familiar with lua coroutine. Could you please describe it in more detail? Does it break compatibility?
it mustbe no break compatibility。 every coroutine have own luastate,main thread is same。 all the cocos callback is in c++ ui thread, so it mean's all the lua coroutine is suspend. it is wait the lua main thread to wakeup. now the code callback with coroutine luastate, but this coroutine is suspend. so we must callback in the lua main thread.
all callback export to lua is not support bind in coroutine。 like following:
now is wrong:
correct: