lua-users home
lua-l archive

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


> 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?

> I was thinking that stoping the gc at a paticular code window might
> solve my problem. If its stopped, I need to know it, so that I can start it
> again.

Can't you simply restart it, even if it is not stopped? It'll be harmless
in this case.

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.
--lhf