[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lua_newthread returning 2 values
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 21 Oct 2008 10:32:24 -0200
> Occasionally lua_newthread is returning two values - rather than one - as it
> is supposed to do!
> I?ve wondered if any side effects of my __gc metamethod could be the
> problem. The cleanup code in the __gc metamethod might possibly re-enter Lua
> somewhere, but I haven?t found evidence of this, yet.
> Any suggestions on what might be happening?
You may try to modify your finalizers (__gc metamethods) and check
whether any modifications affect this behaviour. (E.g., remove some
calls to Lua, push or pop some other values in the stack, etc.) This
may shed more light into the problem.