lua-users home
lua-l archive

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


Is there a way to identify the running thread, something like

    coroutine.current()

that returns either the running coroutine object or an opaque handle
(number.)  If not, would it be a useful addition?  I was thinking about
access restrictions in Lua, where the current thread could serve as a
"certificate" (magic cookie) in some situations.  It should be fairly simple
to implement I'd say.

--
Wim