lua-users home
lua-l archive

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


I?m using Lua to run a ?slideshow? in parallel with other operations of my
application.  To this end, I?m creating a new thread and using lua_yield()
and lua_resume() to wait for the next slide, etc.  When the script is
complete, I want to close up the thread that was handling the script.

My question is, how can I tell when the script is complete?  I figured
lua_resume() would return some signal, but anything other than 0 seems to
flag an error.  I could call a C function to tell me the script is done, but
there must be a simple way I?m missing.

I looked at the code for getting the status of a coroutine, but I?m not
exactly sure what the logic was there, so I thought I should check with the
experts!