[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Stupid question about Lua threads/coroutines.
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 18 Jun 2003 10:36:22 -0300
> At issue is lua_newthread(). In the description it states that it
> "pushes the thread on the stack and returns a pointer to a lua_State
> that represents this new thread". [...] Is it legal to pop it, or will
> this bring the whole edifice crumbling down around me?
Threads in Lua are subject to garbage collection too. If you pop the
new thread without storing it somewhere else, it will be eventually
collected (and the whole edifice will crumb down ;).
-- Roberto