From bc970005ce2e258e29a5c315ea4e49f76a66586e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 12 Feb 2021 13:36:30 -0300 Subject: '__close' methods can yield in the return of a C function When, inside a coroutine, a C function with to-be-closed slots return, the corresponding metamethods can yield. ('__close' metamethods called through 'lua_closeslot' still cannot yield, as there is no continuation to go when resuming.) --- manual/manual.of | 3 +++ 1 file changed, 3 insertions(+) (limited to 'manual/manual.of') diff --git a/manual/manual.of b/manual/manual.of index 89069281..e7040b2b 100644 --- a/manual/manual.of +++ b/manual/manual.of @@ -3102,6 +3102,9 @@ Close the to-be-closed slot at the given index and set its value to @nil. The index must be the last index previously marked to be closed @see{lua_toclose} that is still active (that is, not closed yet). +A @Lid{__close} metamethod cannot yield +when called through this function. + (Exceptionally, this function was introduced in release 5.4.3. It is not present in previous 5.4 releases.) -- cgit v1.2.3-55-g6feb