lua-users home
lua-l archive

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

On Wed, 2003-10-15 at 13:47, Florian Berger wrote:
> Is there a way to detect if a Lua function is already running? Currently
> I'm using global variables to determine if some function is already
> running but it's not very convenient.

If you're not using coroutines then you could use the debugging
reflection library to check backwards up the debug stack to see if a
function has an activation record on the stack.

If you're using coroutines, you're probably stuffed.


Daniel Silverstone             
Hostmaster, Webmaster, and Chief Code Wibbler: Digital-Scurf Unlimited
GPG Public key available from       KeyId: 20687895