isexecutorthread Synchronous

  • is_our_thread
  • isourthread

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.

Syntax
Luau
isexecutorthread(target: thread?) -> boolean

Parameters

Function parameters
ParameterTypeDescription
targetthread?Optional coroutine; defaults to the current one.

Returns

boolean

true 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

Example
Luau
local current = coroutine.running()
print("Executor thread:", isexecutorthread(current))
Kawaii documentation