Is it at all possible to use coroutines with Löve? (I was trying a coooool way to manage processes / sequences of actions that still need to be controlled by events, without loads of state everywhere). I cannot succeed in running (or rather come back from) even the simplest co. I need to know whether it is possible to unblock my debugging mind.
Thank you,
denis
[solved] Error: attempt to yield across ...
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
[solved] Error: attempt to yield across ...
Last edited by spir on Sun Nov 18, 2012 11:59 pm, edited 1 time in total.
... la vita e estrany ...
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Error: attempt to yield across metamethod/C-call boundar
Well, the error basically says what you're doing wrong, you're trying to yield from within a function called from c++ (a physics callback?) or from within a metamethod (like __index).
Re: Error: attempt to yield across metamethod/C-call boundar
Right, but isn't everything called from C when I use Löve? The yielding func in question does about nothing (i reduced the error case) and is just called by love.update. But ultimately it is indeed called by the c/++ framework behind the scene, what do you think? That's why I asked whether it is at all possible to "coroutine" and use Löve.bartbes wrote:Well, the error basically says what you're doing wrong, you're trying to yield from within a function called from c++ (a physics callback?) or from within a metamethod (like __index).
Denis
... la vita e estrany ...
Re: Error: attempt to yield across metamethod/C-call boundar
Found my error, was a wrong usage of the coroutine. Thank you for the help,bartbes wrote:Well, the error basically says what you're doing wrong, you're trying to yield from within a function called from c++ (a physics callback?) or from within a metamethod (like __index).
Denis
... la vita e estrany ...
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Error: attempt to yield across metamethod/C-call boundar
Specifically, you need to yield across boundaries, meaning from lua->c->lua, which barely ever happens in love.spir wrote: Right, but isn't everything called from C when I use Löve?
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot], Google [Bot] and 8 guests