Skip to content

Equivalent of coroutine.yield(value) from rust ? #164

Answered by tguichaoua
tguichaoua asked this question in Q&A
Discussion options

You must be logged in to vote

Since it's not possible to yield accros C-call boundary, I move my api into lua.

function foo()
    local ud = _api.foo() -- call rust to create the userdata
    coroutine.yield(ud)
end

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tguichaoua
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