lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, 2019-08-12 at 16:18 +0200, Viacheslav Usov wrote:
> On Mon, Aug 12, 2019 at 3:45 PM Andreas Falkenhahn <
>> wrote:
> > To clarify, what I mean by "pause" is that lua_pcall() must return
> so that control is back on the UI thread. Later, once I have received
> the event that the message box has been closed, I want to "resume"
> the previous call to lua_pcall().
> Then just make it return. And then call it again. Do not block while
> in the call.

Or use Lua coroutines to make code easier to read. They really can save
the day when it comes to asynchronous code.

Together with `coroutine.wrap` it will require little to no effort on C

v <>