Threads

isourthread

Returns whether the supplied Luau thread is tracked as a Real-created thread.

Syntax

isourthread(thread: thread): boolean
Aliases is_our_thread

Arguments

NameTypeDescription
threadthreadLuau thread to check.

Returns

NameTypeDescription
trackedbooleantrue when the thread is tracked as a Real-created thread; otherwise false.

Description

Returns whether the supplied Luau thread is tracked as a Real-created thread. is_our_thread is an alias.

Call it with 1 parameter(s): thread. The argument table explains which values are required and which ones only refine the behavior.

It returns tracked (boolean). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Check whether a Luau thread is currently tracked by Real's caller context.

local thread = coroutine.create(function()
end)

local tracked = isourthread(thread)
print(tracked)