lua-users home
lua-l archive

Re: Checking whether a state is the top-level state

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


On Wed, Sep 13, 2017 at 4:14 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
> lua_pushthread does that:
>
> Pushes the thread represented by L onto the stack.
> Returns 1 if this thread is the main thread of its state.
>
> https://www.lua.org/manual/5.3/manual.html#lua_pushthread
I would think that can be used to detect if you have the main thread,
but not to locate it if you haven't got it.
Francisco Olarte

AltStyle によって変換されたページ (->オリジナル) /