Threads

setthreadidentity

Sets the identity level for a thread or the current thread.

Syntax

setthreadidentity(thread?: thread, identity: integer)
Aliases set_thread_identitysetidentitysetthreadcapssetthreadcontextset_thread_context

Arguments

NameTypeDescription
thread?threadThread to inspect or run inside.
identityintegerThread identity level to apply.

Description

Sets the identity level for a thread or the current thread.

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

It does not return data. Treat the call as an action and handle errors around the call site when needed.

Example

Example call with placeholder values.

setthreadidentity(coroutine.running(), 1)