TerminateCurrentThread
This function was added in DSL 1
Description
Shutdown the current thread. Similar to TerminateCurrentScript
, control is not instantly taken away. You will have to yield if you want to instantly jump out of thread execution.
function TerminateCurrentThread() --[[ ... ]] end
Parameters
None.
Return Values
None.
Example
-- Create the thread
local thread = CreateThread(function()
-- Do some work
Wait(1000)
-- Terminate the thread
TerminateCurrentThread()
end)