Skip to content
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

Open
agladysh opened this issue Apr 8, 2015 · 7 comments
Open

Workaround for flyield #127

agladysh opened this issue Apr 8, 2015 · 7 comments

Comments

@agladysh
Copy link
Member

agladysh commented Apr 8, 2015

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()

@agladysh
Copy link
Member Author

agladysh commented Apr 8, 2015

Comment #1 originally posted by lua-alchemy on 2009-08-30T08:21:16.000Z:

<empty>

@agladysh
Copy link
Member Author

agladysh commented Apr 8, 2015

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

@agladysh
Copy link
Member Author

agladysh commented Apr 8, 2015

Comment #3 originally posted by lua-alchemy on 2010-05-11T09:58:19.000Z:

<empty>

@agladysh
Copy link
Member Author

agladysh commented Apr 8, 2015

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.

@agladysh
Copy link
Member Author

agladysh commented Apr 8, 2015

Comment #5 originally posted by lua-alchemy on 2011-04-18T20:37:41.000Z:

Note that pcall also need to be replaced.

@agladysh
Copy link
Member Author

agladysh commented Apr 8, 2015

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

@agladysh
Copy link
Member Author

agladysh commented Apr 8, 2015

Comment #7 originally posted by lua-alchemy on 2011-04-18T21:00:22.000Z:

See a rough example here: https://gist.github.com/926163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant