From e657a48ea5698bbd9982d878eb65e6615ec94f7e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 13 Jun 2025 14:08:38 -0300 Subject: The main thread cannot be closed No thread started with pcall (instead of resume) can be closed, because coroutine.close would not respect the expected number of results from the protected call. --- manual/manual.of | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manual') diff --git a/manual/manual.of b/manual/manual.of index 7c504d97..baa33d88 100644 --- a/manual/manual.of +++ b/manual/manual.of @@ -3284,8 +3284,8 @@ If @id{L} is equal to @id{from}, it corresponds to a thread closing itself. In that case, the call does not return; -instead, the resume or the protected call -that (re)started the thread returns. +instead, the resume that (re)started the thread returns. +The thread must be running inside a resume. } -- cgit v1.2.3-55-g6feb