lua-users home
lua-l archive

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


Sorry for the confusing post. Yes, I wanted to know if a thread was a main one or not, because 2 threads being main threads meant they would not be "lua_xmove"-able to one another. I probably should have titled this more appropriately and asked directly about checking the "lua_xmove"-ability, but the information about "lua_pushthread" is helpful too.

Thank you for pointing it out to me! With this, I was able to move forward quite a bit in my implementation. Sorry for missing it in the manual.

On Wed, Sep 13, 2017 at 11:43 AM, Francisco Olarte <folarte@peoplecall.com> wrote:
Luiz:

On Wed, Sep 13, 2017 at 5:13 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> > 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.
> Checking is the subject of this thread, right?

I was confused and thought he needed the main one for something,
specially by some other threads. Reading again it seemed he wanted to
test  lua_xmove ability, and now I'm completely lost on what he wants.
I posted it because I do not see a great deal of utility of knowing
whether your thread is main or not when you do not even know if they
came from the same original main state, but yes, the title said it
right.

Francisco Olarte.