lua-users home
lua-l archive

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


>>> Do upvalues get processed when a coroutine gets collected?
>>
>> Currently no.
>
> Does a closure keep the coroutine in which it was created from being  
> collected? If not, then isn't there a problem if upvalues don't get  
> closed when the coroutine gets collected? Or maybe we miscommunicated  
> since I failed to say "closed" in my earlier message.

I understood what you said, the wrong answer was all my fault; sorry.
upvalues *do* get closed when a coroutine gets collected (see
'luaE_freethread'). (Otherwise, as you said, there would be problems.)

-- Roberto