Category

Threads

Thread context and identity.

Category guide

Overview

Use this overview to understand the category before opening a specific function.
  • See what this group of functions is meant to solve.
  • Compare function names and descriptions in one table.
  • Open a function for syntax, arguments, returns, and examples.

Threads

Available functions

4 functions
FunctionDescription
getscriptfromthreadReturns the Script Instance associated with a Luau thread, or nil when no valid script reference is available.
getthreadidentityReturns the identity for the current Luau thread, or for the first argument when that argument is a thread.
isourthreadReturns whether the supplied Luau thread is tracked as a Real-created thread.
setthreadidentitySets the identity for the current Luau thread, or for a provided Luau thread.