isexecutorthread Synchronous
is_our_threadisourthread
Check whether a coroutine is classified as an executor thread. Pass the thread you are inspecting, or leave it out to ask about the caller.
Luau
isexecutorthread(target: thread?) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
target | thread? | Optional coroutine; defaults to the current one. |
Returns
booleantrue if the chosen thread is executor-owned.
Usage notes
A result for one coroutine does not automatically apply to the others returned by getallthreads.
Example
Luau
local current = coroutine.running()
print("Executor thread:", isexecutorthread(current))