[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.4.0 (alpha-rc1) now available
- From: Thijs Schreijer <thijs@...>
- Date: Thu, 30 May 2019 12:42:24 +0000
> On 30 May 2019, at 02:38, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
>
> Lua 5.4.0 (alpha-rc1) is now available for testing at
> http://www.lua.org/work/lua-5.4.0-alpha-rc1.tar.gz
>
> The checksums are
> MD5 56f18a477f5a962eeca4d5bb0ccad34b -
> SHA1 def2b1be4c0a4eaab8afd25c8ba87f6a42074f3b -
>
> This is an alpha version. Some details may change in the final version.
>
> The main changes in Lua 5.4.0 are listed at
> http://www.lua.org/work/doc/#changes
>
> An updated reference manual is included and also available at
> http://www.lua.org/work/doc
>
> The complete diffs from work2 to alpha are available at
> http://www.lua.org/work/diffs-lua-5.4.0-work2-alpha.html
> http://www.lua.org/work/diffu-lua-5.4.0-work2-alpha.html
>
> If your platform is a common Unix-like platform, just do
> make guess
> The Makefile will guess your platform using uname and build Lua for it.
>
> All feedback welcome. Thanks.
> --lhf
>
The manual states: "If a coroutine yields inside a block and is never resumed again, the variables visible at that block will never go out of scope, and therefore they will not be closed.”
Since this is quite explicitly mentioned, I’m confused as to what will happen when I let go of a suspended coroutine and it gets garbage collected? Will the __close handlers be called or not in that case? Maybe some clarification would be justified here.
Also what would be the order? Say 2 to-be-closed ones in such a coroutine that gets garbage collected, will the order be __close, __close, __gc, __gc, or would it be __close, __gc, __close, __gc ?
Thijs