[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Safely adding coroutine.yield() to Lua code string
- From: Andrew Gierth <andrew@...>
- Date: Sun, 21 Jun 2020 14:59:42 +0100
>>>>> "Abhijit" == Abhijit Nandy <firstname.lastname@example.org> writes:
Abhijit> Any other way to make the interpreter safely yield would be
Abhijit> great too. Has anyone tried to use the debug library to make
Abhijit> the interpreter yield after a specific amount of time, by
Abhijit> using the line callbacks to track the time?
Notice that using lua_yield() from a line hook or (better) a count hook
is explicitly documented, so this would be the first method I'd try.