mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Update function-coroutine-close.md
Clarify behavior when calling coroutine.close repeatedly.
This commit is contained in:
parent
41f386b1c0
commit
e7b50dc41b
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ We implement Lua 5.4 behavior exactly with the exception of to-be-closed variabl
|
||||||
|
|
||||||
The `co` argument must be a coroutine object (of type `thread`).
|
The `co` argument must be a coroutine object (of type `thread`).
|
||||||
|
|
||||||
After closing the coroutine, it gets transitioned to dead state which means that `coroutine.status` will return `"dead"` and attempts to resume the coroutine will fail. In addition, the coroutine stack (which can be accessed via `debug.traceback` or `debug.info`) will become empty.
|
After closing the coroutine, it gets transitioned to dead state which means that `coroutine.status` will return `"dead"` and attempts to resume the coroutine will fail. In addition, the coroutine stack (which can be accessed via `debug.traceback` or `debug.info`) will become empty. Calling `coroutine.close` on a closed coroutine will return the same information as it returned the first time - that is, `true` if the coroutine was in a non-error state when closed for the first time, and `false` plus the error object otherwise.
|
||||||
|
|
||||||
## Drawbacks
|
## Drawbacks
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue