[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: About lua_newthread
- From: "mos" <mmosquito@...>
- Date: Thu, 18 May 2006 21:57:12 +0800
Hi
in lua5.1 manual:
lua_newthread
lua_State *lua_newthread (lua_State *L);
There is no explicit function to close or to destroy a thread. Threads are
subject to garbage collection, like any Lua object
I don't understand this , for example like Npc in a game
function AI()
while(true) do
walkto(A)
walkto(B)
...
walkto(Z)
end
end
I bind each npc with a lua_State by lua_newthread
but the npc will die and i should close the lua_State , but I can
not.
what can I do ? or some better suggestion ?
Best Regards
mos