[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_gc()
- From: "D Burgess" <dburgess@...>
- Date: Wed, 2 Aug 2006 23:28:35 +1000
Luiz Henrique de Figueiredo wrote:
> I have a 1:1 relationship between OS threads and Lua threads
> and only one of the OS threads executes at a time.
I assume you want this instead of a Lua *state* for each OS thread.
Have you defined locking inside the Lua core with lua_lock?
It has to be that way, Lua is being placed in an existing app.
Can't you simply restart it, even if it is not stopped? It'll be harmless
in this case.
Maybe, I will see how it fits in the code. Thanks.
Anyway, since you're debugging, you may add a kludge to lua_gc that
returns this info:
default: res = (g->GCthreshold == MAX_LUMEM);
Then call lua_gc(L,-1,0) (anything other than LUAGC_* instead of -1 will do).
This will return 1 of the gc is stopped.
Many thanks.
David B.