lua-users home
lua-l archive

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


Good, thank you.

On Tue, Nov 13, 2012 at 5:03 PM, Thijs Schreijer <thijs@thijsschreijer.nl> wrote:
> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of Tang Daogang
> Sent: dinsdag 13 november 2012 6:51
> To: Lua mailing list
> Subject: hi, does lua's gc collect the coroutines at 'suspended' status?
>
> hi,
>
> if I remove the reference of corounte A, and A is at  'suspended' status?
> Does lua's gc collect this coroutine? and if at 'running', 'dead' ?
>
> thanks.
>
>
> --
> Nothing is impossible.

Yes it will be collected. Probably best; if you have no reference left to
the thread, you cannot resume it.

It will even collect the running thread if not anchored. See this thread for
some info;
http://thread.gmane.org/gmane.comp.lang.lua.general/94150/focus=94172





--
Nothing is impossible.