[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to swap coroutine ?
- From: Graham Wakefield <wakefield@...>
- Date: Mon, 12 Sep 2011 23:53:50 -0700
Exactly. Start your script with lua_resume() rather than lua_call().
On Sep 12, 2011, at 1:36 PM, Wesley Smith wrote:
>> I know it is not that hard to add a "scheduler:run()" at the end of a main
>> script, but I would like the main thread to give up control before reaching
>> the end of the script:
>
> If you run the entire script as the body of a coroutine, it can yield
> at any point.
> wes
>