Today try to use Coroutine in the lua5.1 of the project, think "elegant" to solve the problem of pop-up dialog box, let it have the return value.
But encountered lua:attempt to yield across Metamethod/c-call boundary. check on the Internet, did not fix, will not get. (The consequence of not being enthusiastic about work is this, if I love it, I will replace the whole project with Lua 5.2,5.3)
Here are a few articles for future backup. And a little summary of your own:
Http://blog.codingnow.com/2012/06/continuation_in_lua_52.html
Http://lua-users.org/lists/lua-l/2008-05/msg00181.html
Http://stackoverflow.com/questions/8459459/lua-coroutine-error-tempt-to-yield-across-metamethod-c-call-boundary
Http://www.cppblog.com/kevinlynx/archive/2008/08/12/58636.html
1, some people have made it clear that the main line thread yield will make this mistake. The explanations given in the cloud-wind blog seem to be more essential.
2,cppblog's article, obviously wrote a (it is to solve the dialog box problem), but its code I almost copy, embedded in the project, or not. It also uses 5.1.
Coroutine in Lua