Returns
table
A fresh array (1-indexed) of live threads.
Behavior
- Only live threads are returned; dead threads are skipped.
- The result is scoped to the current Lua state. Threads running in other Actor VMs are not included here.
- This is equivalent to the thread subset of
getgc(true)but walks only for threads, so it allocates less and reads more clearly when threads are all you need.
Example
Report the status of every live thread:Errors
getallthreads does not raise under normal conditions.