Skip to content

Passing data between GD.yield() and resume() #13

Answered by gilzoide
Alikae asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there!
I thought data was already being passed from resume to the code that yielded, but I'll be honest and say that I haven't tested this flow.
coroutine.resume and coroutine.yield are builtin Lua functions, part of its coroutine implementation.

Is there something I missed about how to use it ?

Not at all, this is a bug.
Most likely the fault is the lack of returning the result of coroutine.yield at the end of GD.yield:

coroutine_yield(co_obj)
end

Sorry about that.

I created issue #14 related to this problem. Thanks for the report!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Alikae
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants