Closures

isexecutorclosure

Returns whether the provided function is classified as executor-owned.

Syntax

isexecutorclosure(func: function): boolean
Aliases isexploitfunctionisourclosurecheckclosure

Arguments

NameTypeDescription
funcfunctionFunction to classify. Passing a non-function raises a type error.

Returns

NameTypeDescription
isExecutorClosurebooleantrue when the function is classified as executor-owned; otherwise false.

Description

Returns whether the provided function is classified as executor-owned. The argument must be a function. The function does not inspect source text, debug names, bytecode hashes, or call stack ownership.

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

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

Example

Classify a closure with Real's executor-closure checks.

local result = isexecutorclosure(print)
print(result)