Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local coroutine_first = nil
- local coroutine_second = nil
- local function caller_first()
- print("First coroutine")
- print("Starting second coroutine")
- result_coroutine = coroutine_second
- end
- local function caller_second()
- print("Second coroutine")
- print("Starting first coroutine")
- result_coroutine = coroutine_first
- end
- function main()
- coroutine_first = coroutine.wrap(caller_first())
- print("Test between wraps")
- coroutine_second = coroutine.wrap(caller_second())
- result_coroutine = coroutine_first
- print("End main" + result_coroutine)
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement