[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Detecting if function is running.
- From: Daniel Silverstone <dsilvers@...>
- Date: Wed, 15 Oct 2003 13:50:40 +0100
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 http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler: Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org KeyId: 20687895