Skip to content
Thread dispatchOverviewNew · 0.744

setexecutorthread

Describe executor-context classification for a coroutine.

Aliasessetsynapsethread

Details#

Marks a supplied thread, or the current thread, with the module's executor-thread flag. The boolean defaults to true. This changes classification, not coroutine scheduling or remote permissions; returns the selected boolean.

Examples#

Example

Luau
local thread = coroutine.create(function() end)
setexecutorthread(thread, true)
print(isexecutorthread(thread)) -- true
setexecutorthread(thread, false)