mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Update function-coroutine-close.md
Clarify dead status and stack clear.
This commit is contained in:
parent
132b852a24
commit
41f386b1c0
1 changed files with 2 additions and 0 deletions
|
@ -22,6 +22,8 @@ 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.
|
||||||
|
|
||||||
## Drawbacks
|
## Drawbacks
|
||||||
|
|
||||||
None known, as this function doesn't introduce any existing states to coroutines, and is similar to running the coroutine to completion/error.
|
None known, as this function doesn't introduce any existing states to coroutines, and is similar to running the coroutine to completion/error.
|
||||||
|
|
Loading…
Add table
Reference in a new issue