lua-users home
lua-l archive

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


> 2010/1/6 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
> >> Does that mean in 5.2, I can't have any per-thread data? It has to
> >> be global to a Lua state or private to a function?
> >
> > Note that in 5.1 the built-in per-thread data is not very useful, as you
> > cannot access it from Lua. (That is the main reason why we are removing
> > it).
> 
> Isn't debug.getfenv on a thread object returning it ?

Yes, but remember that "The functions provided [by the debug library]
should be used exclusively for debugging and similar tasks, such
as profiling. Please resist the temptation to use them as a usual
programming tool:"

-- Roberto