New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround for flyield #127
Comments
Comment #1 originally posted by lua-alchemy on 2009-08-30T08:21:16.000Z: <empty> |
Comment #2 originally posted by lua-alchemy on 2009-09-10T23:28:12.000Z: Note that coro.lua is already available in ag/lua-test-system branch |
Comment #3 originally posted by lua-alchemy on 2010-05-11T09:58:19.000Z: <empty> |
Comment #4 originally posted by lua-alchemy on 2011-04-18T20:33:29.000Z: No, coro.lua is no longer available. But we will have to bring it back. |
Comment #5 originally posted by lua-alchemy on 2011-04-18T20:37:41.000Z: Note that pcall also need to be replaced. |
Comment #6 originally posted by lua-alchemy on 2011-04-18T20:55:58.000Z: New link for the cases is here: https://github.com/lua-nucleo/lua-nucleo/blob/master/test/cases/0050-coro.lua |
Comment #7 originally posted by lua-alchemy on 2011-04-18T21:00:22.000Z: See a rough example here: https://gist.github.com/926163 |
Original issue 121 created by lua-alchemy on 2009-08-30T08:20:48.000Z:
Employ "controller coroutine" idiom in loadfile/dofile (as opt-in
functionality), and yield back to the controlling AS3 code, so callbacks
would be called back to Lua.
Use this:
http://github.com/lua-nucleo/lua-nucleo/blob/master/lua-
nucleo/coro.lua
See usage example in tests:
http://github.com/lua-nucleo/lua-nucleo/blob/master/test/coro.lua
If opt-in is enabled:
Enable as3.filegetcontents() in loadfile()
Replace all as3.flyield()s in as3.filegetcontents() with coro.yield_outer().
Replace coroutine.resume() with coro.resume_inner()
The text was updated successfully, but these errors were encountered: