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.
This commit is contained in:
@@ -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.
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user