[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: CPU/Memory Limiting
- From: gary ng <garyng2000@...>
- Date: Mon, 9 Jul 2007 00:07:50 -0700 (PDT)
--- Asko Kauppi <firstname.lastname@example.org> wrote:
> The way Lua Lanes helps make modules multithreaded
> capable is it protects calls to 'require' so that
> only one happens at a time. This allows the module
> author to do things s.a. "did we get this
> initialized already" checks without resorting to
> critical sections.
I believe we are talking about different things. What
I was talking about is the scenario of :
single process, multiple lua_State where each state
has its own 'require' of some modules(.so). And
strictly speaking it has nothing to do with the module
author or critical sections but more about how how the
.so is loaded. It seems to be some problem deeper than
that. So even each module make the proper calls to
free the .so things(as far as I can trace to for
example the luasql-mysql), there is something prevents
the lua_State from properly clean up.
This usually is not an issue for other language where
when we are talking about multi-threading, it is
usually more like sharing single VM between threads.
The net result is that if I am not aware of this, a
few hundred/thousand(depends on memory configuration)
thread creation/termination would result in out of
It is just a "user beware" about this "single process,
multiple lua_State" contineous usage, not in
particular to lua lanes or rings.
Got a little couch potato?
Check out fun summer activities for kids.