lua-users home
lua-l archive

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




On Dec 22, 2017 12:52 PM, "Luiz Henrique de Figueiredo" <lhf@tecgraf.puc-rio.br> wrote:
> "Creates a new thread running in a new, independent state...."
>
> What does "thread" mean here? A pthread, for example?

"The type thread represents independent threads of execution ...

Thanks, but I hope you can see why I find this language a little opaque. "Type thread represents thread" is circular.

I take that the Lua engine implements it's own lthread infrastructure, which is non-pre-emptive. Yeah? So a Lua thread is basically a set of state data - an environment in which code executes. Afaik exactly parallel to any generic threading lib like pthreads (where a "thread" is actually a data structure). No? (I confess I find the language of threads confusing in general.)